| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 1024 MB | 766 | 523 | 477 | 68.931% |
You were so hyped to attend the final game of the Ball And Paddle Competition, where the two best teams in the world compete to paddle as many balls into the opponent's goal as possible. But alas, you fell ill, and cannot join your friends. Luckily, your friends took lots of pictures during the match, and after the match concluded, they sent you all the pictures that they have. Because the messaging app uploads and downloads the pictures in parallel, you are wondering whether you received them in chronological order. It looks like the scoreboards in each picture are unique, and knowing that the score of a team can only increase over time, you should be able to figure this out. Feeling too sick to check the order of the pictures manually, you decide to write a program that checks temporal consistency based on the scoreboards that are in the picture.
Given a list of intermediate scores from the match, determine whether the scores are in chronological order.
The input consists of:
Every pair of scores $(a, b)$ in the input is unique.
The order of the scores in the input is the order in which you received the pictures.
Output "yes" if the scores are in chronological order, or "no" if they are not.
4 1 0 2 0 4 0 4 1
yes
3 0 0 1 0 0 2
no
5 1 2 0 0 4 3 2 3 5 5
no
ICPC > Regionals > Europe > Northwestern European Regional Contest > Benelux Algorithm Programming Contest > BAPC 2024 J번