Ultraviolet A 810, uva810
This question is hard to understand... so I don't want to do it.
Meaning :!
Place the sieve in an initial position to know its initial status (determined by the top points and the top points)
In four directions. The condition that can be flipped: if and only if the number of points at the top of the current position is the same as the number of points at the next position.
If you can flip it back. Output path.
The difficulty lies in how to know the die just rely on the front and top side> ....
You can create a big one ~~~~ Table... In fact, you don't need to create all tables ~ Because the sum of the two sides of the dice is 7;
Then there is the path output, which is why the queue is written without queue in BFS-you can save the parent node (for the moment, this is called it, used for final output ~
Code:
No code .... Http://blog.csdn.net/accelerator_/article/details/39966329