Editorial for COCI '08 Contest 5 #6 Kruska


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.

The state is described by the current position, direction and day of week. The total number of states is 200 \times 200 \times 4 \times 7 = 1\,120\,000. As in the fourth task, with a large number of moves, Aladdin will eventually enter a cycle and we can predict what will happen with him.


Comments

There are no comments at the moment.