Back to General discussions forum
My answer: 14 10 12 12 12 Correct: 14 10 12 12 13 My steps:
input data:
X---X-X
-XX----
---X--X
X-XXXX-
X------
1 3 2 2 0 2 0
2 2 2 3 2 3 2
2 4 5 4 4 3 1
1 3 2 3 3 2 2
1 3 2 3 3 2 1
X - - - - -
X X X - X -
X X X X X -
X - X X - -
2 2 4 2 2 1 1
2 2 3 1 3 1 2
2 4 6 5 6 3 3
2 2 4 4 5 3 2
2 2 5 4 4 3 1
X - - - - -
X X - X - -
X - - - X -
X - - - X -
2 2 3 2 1 1 0
2 2 2 2 1 3 2
2 3 3 2 3 3 2
2 1 2 0 3 3 4
2 1 2 0 2 1 2
X X - - - -
X X - - X -
X X - X X X
2 3 3 2 1 1 1
3 5 5 4 3 3 3
2 3 3 4 4 5 3
1 2 2 3 3 4 3
0 0 0 1 2 2 1
X - - - X X X
X X - - - X
2 2 1 2 2 3 2
2 5 4 3 1 3 2
2 2 2 4 4 6 3
1 2 3 2 1 3 1
0 0 1 2 2 2 1
X - - X - X X
X X - - - X
From the problem: "Note: if you will implement the game using a kind of 2D array, make sure it is large enough and the initial configuration is placed far from edges, so that it will not reach them in 5 moves - otherwise your results could be spoiled."
Thanks a lot. Got one.