Logo
(追記) (追記ここまで)

32604번 - Jumbled Scoreboards 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB76652347768.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:

  • One line with an integer $n$ (1ドル\leq n\leq 100$), the number of pictures you received.
  • $n$ lines, each with two integers $a$ and $b$ (0ドル \leq a,b \leq 100$), the scores of the two teams in one of the pictures.

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.

제한

예제 입력 1

4
1 0
2 0
4 0
4 1

예제 출력 1

yes

예제 입력 2

3
0 0
1 0
0 2

예제 출력 2

no

예제 입력 3

5
1 2
0 0
4 3
2 3
5 5

예제 출력 3

no

힌트

출처

ICPC > Regionals > Europe > Northwestern European Regional Contest > Benelux Algorithm Programming Contest > BAPC 2024 J번

  • 문제를 만든 사람: Lammert Westerdijk
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /