Page 1 of 1

910 - TV game

Posted: Mon Apr 23, 2007 12:32 am
by Nakar
What is a correct output by this input:

Code: Select all

2
A A B x
B B B -
0
2
A A A x
B B B -
0
5
A B E -
B D C -
C D A x
D D B -
E E E -
1
5
A B E -
B D C -
C D A x
D D B -
E E E -
2
5
A B E -
B D C -
C D A x
D D B -
E E E -
3
5
A B E -
B D C -
C D A x
D D B -
E E E -
4
5
A B E -
B D C -
C D A x
D D B -
E E E -
5
5
A B E -
B D C -
C D A x
D D B -
E E E -
29
5
A B E -
B D C -
C D A x
D D B -
E E E -
30
7
A B E -
B D C -
C D A x
D D B -
E E F -
F G G -
G G E -
30

My output (WA) is:

Code: Select all

1
1
0
1
0
1
3
13480512
25900017
25900017

Posted: Mon Apr 23, 2007 12:33 am
by Nakar
Another cuestion:
What is the meaning of "Notice that should A also be a special position, there would be a way of scoring in zero moves."

Thanks.

(I speak spanish)

Posted: Mon Apr 23, 2007 7:18 am
by helloneo
Your output is correct.. and the statements mean that the starting postion also can be the final postion..
BTW, did you consider there can be multiple final positions..?

Posted: Mon Apr 23, 2007 9:30 am
by Nakar
I have not considered multilple final position.

I will try.

Thanks.

Posted: Mon Apr 23, 2007 4:47 pm
by Nakar
Continue with WA:

My input:

Code: Select all

5
A B E x
B D C -
C D A -
D D B -
E E E -
5
5
A B E -
B D C x
C D A -
D D B -
E E E -
5
5
A B E -
B D C -
C D A x
D D B -
E E E -
5
5
A B E -
B D C -
C D A -
D D B x
E E E -
5
5
A B E -
B D C -
C D A -
D D B -
E E E x
5
5
A B E x
B D C x
C D A x
D D B x
E E E x
5
My output (WA) ???????

Code: Select all

1
3
3
7
2
16

Help, please.

Posted: Mon Apr 23, 2007 5:12 pm
by helloneo
My AC code gives this on your case..

Code: Select all

1
3
3
7
18
32

Posted: Tue Apr 24, 2007 1:43 pm
by Nakar
AC

Thanks helloneo.

Re: 910 - TV game

Posted: Wed Jul 13, 2011 10:29 pm
by ghooo
Intersting test case:

Code: Select all

1
A A A x
10
The answer:

Code: Select all

1024