Solved by 264 users: ...
` <  <  <  <  <  <  <  <  <  < `

## Two cubes

Time limit = 5

There are two cubes with integer number on each side. These numbers are from the set {1, 2, .. 1000}. Numbers on different sides can be the same.

Your program should detect whether these cubes are

• 1) equal
• 2) reflections of each other
• 3) different

If two cases 1) and 2) have took place together then consider this situation as 1).

Input Two cube descriptions. Cube descripition is the list of six numbers delimited with "white space". These numbers are numbers on the cube sides given in the following order:

• Noth (0,1,0)
• West (-1,0,0)
• Up (0,0,1)
• East (1,0,0)
• South (0,-1,0)
• Down (0,0,-1)

"White space" is spaces, tab symbols, line ends.

Output Your program should output one line with one number:
1, if cubes are equal
2, if cubes are reflections of each other,
0, otherwise.

 Input#1``` 1 2 3 4 5 6 5 2 6 4 1 3 ``` Output#1```1 ```

Author:
Dmitry Korolev

<PREV | Problem set | Search related messages | NEXT>

 © acm.mipt DevGroupThe page was generated in 190ms