백준 1931 - 회의실 배정 (파이썬)
Updated:
Answer
n = int(input())
t = [list(map(int, input().split())) for _ in range(n)]
t.sort(key = lambda x : x[0])
t.sort(key = lambda x : x[1])
last = 0
cnt = 0
for s, e in t:
if s >= last:
cnt += 1
last = e
print(cnt)