| Online MIPT programming contest | РУССКИЙ |
| <PREV Problem: | NEXT> |
< |
|---|
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
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:
"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#11 2 3 4 5 6 5 2 6 4 1 3 |
Output#11 |
Author:
Dmitry Korolev
© acm.mipt DevGroup The page was generated in 360ms |