Editorial for Max's Anger Contest Series 1 P2 - Wesley's Anger Contest 7 P1 - Enraged


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: maxcruickshanks

Realize that you only need to remove a student if there is one in both rows for a given column.

Now, count the number of columns filled with students and, if that is less than or equal to 2, output YES; otherwise, output NO.

Time Complexity: \mathcal{O}(N)


Comments

There are no comments at the moment.