WAC - Snow Day Predictor

Submit solution

Points: 3
Time limit: 1.0s
Memory limit: 256M

Problem type

This problem was featured from DMOJ's Wesley Anger Contest 3 and has been transferred to this site. If there are any concerns regarding a specific problem's time limit, please contact the administrators.

Being fed up with online snow day predictors and their inaccurate results, you have decided to take matters into your own hands and write your own snow day predictor.

You are given the temperature \(T\) (in Celsius), the total amount of snowfall \(D\) (in centimetres), and the probability of freezing rain \(P\) (as a percentage).

A snow day will only occur if at least two of the following conditions are satisfied:

  • The temperature is strictly colder than -40 degrees Celsius.
  • There is 15cm of snow or more on the ground.
  • The risk of freezing rain is strictly more than 50%.

Please determine whether the given weather information will cause a snow day. If there is a snow day, output YES. Otherwise, output NO.


For this problem, you will be required to pass all the samples in order to receive any points.

\(-100 \le T \le 100\)
\(0 \le D \le 100\)
\(0 \le P \le 100\)

Input Specification

The first and only line will contain \(3\) integers \(T\), \(D\), and \(P\), representing the temperature, the snowfall, and the risk of freezing rain.

Output Specification

Output one line only. If there is a snow day, output YES. Otherwise, output NO.

Sample Input 1

-41 5 51

Sample Output 1


Sample Input 2

-8 16 10

Sample Output 2



  • 1
    Grace_Montgomery  commented on Jan. 30, 2024, 12:19 a.m.

    The easiest way to predict a snow day is from [this link].1