传统题 1000ms 256MiB

On and Off

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

Problem Statement

Takahashi turns on the light of his room at SS o'clock (on the 2424-hour clock) every day and turns it off at TT o'clock every day.

The date may change while the light is on.

Determine whether the light is on at 3030 minutes past XX o'clock.

Constraints

  • 0S,T,X230 \leq S, T, X \leq 23
  • STS \neq T​
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:

SS TT XX

Output

If the light is on at 3030 minutes past XX o'clock, print Yes; otherwise, print No.

Sample Input 1

7 20 12

Sample Output 1

Yes

The light is on between 77 o'clock and 2020 o'clock. At 3030 minutes past 1212 o'clock, it is on, so we print Yes.

Sample Input 2

20 7 12

Sample Output 2

No

The light is on between 00 o'clock and 77 o'clock, and between 2020 o'clock and 00 o'clock (on the next day). At 3030 minutes past 1212 o'clock, it is off, so we print No.

Sample Input 3

23 0 23

Sample Output 3

Yes

2024暑期集训第二周小测

未参加
状态
已结束
规则
ACM/ICPC
题目
6
开始于
2024-7-10 19:00
结束于
2024-7-10 21:00
持续时间
2 小时
主持人
参赛人数
46