Solved by 150 users: ...
Time limit = 5
Cube is on one of square of chessboard.
There are positive integers on cube sides.
You should roll the cube to the desination square and get minimal penalty.
Each move penalty is increased be the number that is on the down-side of the cube.
The initial and the destination square of the cube.
Then six numbers follow: numbers on the south, north, up, right, down and left sides.
Your program should output minimal penalty.
a1 b2 1 1 1 1 1 1
e2 e3 0 8 1 2 1 1
III St-Peterburg school team contest, 9 December 1995.
Played at MIPT contest 3 October 2004.
<PREV | Problem set | Search related messages | NEXT>