z-rubik's cube
In the World championship in solving Rubik's cube, little Z unfortunately went out in qualification round, so he is now competing for an consolation prize. In this contest, knowledge is not as important as the luck is. Each competitor receives a computer generated sequence of moves to make on Rubik's cube.
There are no moves that allow rotation of whole cube in the space - only one side of the cube is allowed to be rotated. There are six basic moves: L,R,U,D,F and B which represent 90 degree clockwise rotation. On the image below you can see the basic moves.
Also, another two groups of six moves each are allowed. One of them are double rotations: L2, R2, U2, D2, F2 and B2 which represent 180 degree rotations of the nominated side. Last group are backward moves: L', R' ,U' ,D' ,F' and B' which represent 90 degree counter-clockwise rotations. These two types of moves are given with two signs (the basic move + 2 or ').
The starting position is a solved Rubik's cube configuration i.e. all cube sides are of the same color. After that the judges check if the given commands are executed properly, and finally assigns points for the final pattern obtained.
For every of the six cube sides, the competitors can earn 0 to 5 points. One point for any of five possible symmetries (four axial and one central). On the "sample" image, front side earn 3 points (diagonals and central symmetries), right side 1 point (for central) and top side 1 point (for horizontal axis symmetry).
Input:
R'LOutput:
3 5 3 5 3 3Explanation: After this two moves, Left and Right sides of the cube stay unchanged. That is 5 points for each. Up, Down, Front and Back sides are worth 3 points each, image "Example 1". (horizontal and vertical axis symmetry, and central as well).
Input:
R2L2U2D2F2B2Output:
5 5 5 5 5 5Explanation: After all six sides of the cube are rotated by 90 degrees, all the 6 sides have same pattern - with all five symmetries in presence, image "Example 2".
Submit solution
Coming laterThe grading service will be connected in a later migration step. You can inspect the task and your previous results now.