-Code
now_t, now_p = -1, -1
flag = True
for _ in range(int(input())):
a, b = map(int, input().split())
if not flag:
continue
if now_t > a or now_p > b:
flag = False
continue
now_t, now_p = a, b
print("yes" if flag else "no")
'Beakjoon&프로그래머스 > 파이썬' 카테고리의 다른 글
[백준/파이썬] 32327번 Dusa And The Yobis (1) | 2024.11.03 |
---|---|
[백준/파이썬] 32587번 Dragged-out Duel (0) | 2024.11.02 |
[백준/파이썬] 26336번 Are We Stopping Again? (0) | 2024.10.31 |
[백준/파이썬] 32305번 Farmers’ Market (1) | 2024.10.30 |
[백준/파이썬] 32585번 Building Pyramids (1) | 2024.10.29 |