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.
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 . 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