Editorial for COCI '09 Contest 6 #1 Kajak


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.

We start from the finish and work our way to the start. As we encounter kayaks along the way, we mark them in increasing order. Just be careful to mark two kayaks in the same column with the same number.


Comments

There are no comments at the moment.