F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Cube again

Time 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
11 11 223344 223344 55 55 66 66 22 22 113355 113355 44 44 66 66 11 11 223344 223344 55 55 66 66 22 22 113344 113344 55 55 66 66 11 11 223344 223344 55 55 66 66 13 13 223544 223544 56 56 61 61
 

Sample Output
yes yes no
 

Author
BUPT
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-22 14:36:44, Gzip enabled