Solved by 35 users: maa, PetrovSergey, dan, markr, DD, ich, tomek, mikleb, EA, andyzh1314, Rizvanov, RAVEman, blackmath, akuegel, wInuX, WsemirZ, tourist, zloy_mipt, mazahaka, pmnox, jimm88, checkil, defrager, UdH-WiNGeR, avg79, Al.Cash, abortmozga.ru, Dest, Kuznetsov_S, ripatti, Oleg42, oleg.dudrov, Austeritas, mathematic, murphy.
UserDateAttemptTimeCMSC
Rizvanov`21 jan 2008`C++701.45623
Al.Cash`03 aug 2009`C++502.86847
UdH-WiNGeR`09 mar 2009`Java300.791021
abortmozga.ru`30 aug 2009`C++1001.361081
tourist`25 aug 2008`Kylix1000.271160
tomek`08 sep 2006`C++3200.761174
pmnox`05 feb 2009`C++704.821196
Oleg42`25 dec 2010`C++100.931202
oleg.dudrov`15 jan 2011`C++400.951202
Kuznetsov_S`02 dec 2009`C++200.541233
 C++ 25 C 4 Java 2 Kylix 2 FPC 2
` >  >  >  >  >  >  >  >  >  > `

## Rubik's Cube 2 × 2 × 2

Time limit = 5

Cube 2 × 2 × 2 development :

 ``` 1 2 3 4 ---- 17 18 | 5 6 | 21 22 19 20 | 7 8 | 23 24 ---- 9 10 11 12 ---- 13 14 15 16 ```

Input One line with 24 colors numbers. i-th number corresponds to the color of the i-th cell.

Output Minimal number of 90°-rotations needed to come to state with one-colour (monochromatic) sides .

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

Author:
Kvasov Igor
20 May 2003

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

 © acm.mipt DevGroupThe page was generated in 190ms