Editorial for DMOPC '18 Contest 1 P0 - Sorting


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.

Author: Kirito

The blocks are ordered if the previous element is less than or equal to the next element. If all blocks satisfy this condition, we can print Good job!, otherwise we print Try again!.

Time Complexity: \mathcal O(1).


Comments

There are no comments at the moment.