| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 2048 MB | 38 | 34 | 32 | 88.889% |
It is the 25th of November, 1625. You have put a lot of time into making a mechanical watch, but you are unsure if the hands are placed correctly. Even a watch that is not running is correct twice a day, but if the hands of the watch do not correspond to a real time, it is never correct at all. Without wasting any more time, you measure the angles of the hands and check whether they correspond to a real time.
For example, consider the first sample input, visualized in Figure K.1: if the minute hand points to a quarter past (90 degrees from 12 o'clock), then the hour hand cannot point exactly to 2 o'clock (60 degrees from 12 o'clock).
You know that both hands of the watch are moving continuously.
Figure K.1: Illustrations of the sample inputs. The first and third sample inputs do not correspond to a real time. The second and fourth sample inputs do correspond to a real time.
The input consists of:
If the angles of the hands correspond to a real time, output "yes". Otherwise, output "no".
60 90
no
30 0
yes
30 1
no
32 24
yes
ICPC > Regionals > Europe > Northwestern European Regional Contest > Benelux Algorithm Programming Contest > BAPC 2025 K번