Editorial for Wesley's Anger Contest 3 Problem 1 - Snow Day Predictor

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

The straightforward approach is to count the number of conditions that are satisfied. One thing to watch out is the correct usage of the inequality symbols defined in the problem statement.

To write a clean solution, a variable is used to keep track of the number of valid conditions. If this variable is greater than 1, then we output YES. Otherwise the answer is NO.

Time Complexity: \mathcal{O}(1)


There are no comments at the moment.