|
||||||||||
Cube againTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 389 Accepted Submission(s): 92 Problem Description Given the state of two 2*2 magic cube, you need to find out whether they are isomorphism or not. Isomorphism means that one cube can be the same with the other one after rotating the whole cube, specular reflection and swapping all the same color on the cube with another color. Input There are no more than 10000 test case end with EOF. Each case contains 16 lines. First 8 lines describe the state of the first cube, and the next 8 line describe the other one. A state is given as the format in the picture above. Number from 1 to 6 means the colors. All states are ensured legal. Output If the two cube are isomorphism, print "yes", otherwise print "no", without quotes. Sample Input
Sample Output
Author BUPT Source | ||||||||||
|