Home > Back-end >  HBUT - OJ 1075 how to do
HBUT - OJ 1075 how to do

Time:10-17

Address: http://acm.gplusplus.pw/hbutoj/showProblemAction? ProblemId=1075
Shortly after the most popular Rubik's cube, Rubik invented its simplified version - Rubik's magic, Mr Rubik's magic is composed of eight squares of the same size, color are not the same for each square, available Numbers 1 to 8, respectively, at any time the state of the Rubik's magic squares available said: the color of the sequence starting at the upper left of the Rubik's magic, according to clockwise to write down the block in turn color code, the resulting sequence of Numbers can be said at this time the state of the Rubik's magic, for example, sequence (1,2,3,4,5,6,7,8) Rubik's magic status to:
1 2 3 4
8 July 6 5
For rubik's magic, it can be applied in three different operation, the specific operation method is as follows:
A: two lines up and swap, as shown above can transform for the state
8 July 6 5
1 2 3 4
B: each cycle moves to the right one at the same time, as shown above can transform to
1 2 3 4
5 8 July 6
C: the middle four squares clockwise, as shown above can transform to
1 and 2 4
8 6 3 5

Give your rubik's magic initial state and target state, please give the initial state to the minimum number of transformation mode transformation step, if there are multiple transform scheme will take dictionary order minimum of that kind of,
Address: http://acm.gplusplus.pw/hbutoj/showProblemAction? ProblemId=1075

CodePudding user response:

Magic version looks good esoteric ah ~
  • Related