1931번: 회의실 배정 (acmicpc.net)

## 풀이
회의가 끝나는 시간 기준으로 정렬하고,
가장 먼저 끝나는 회의를 계속 선택해나간다.
만약 끝나는 시간 이전에 시작하는 회의라면 선택하지 않는다

그리디 알고리즘 문제

## code
import sys
input = sys.stdin.readlines

l = list(map(lambda x:x.rstrip().replace('\x1a',''),input()[1:]))
l2 = list(map(lambda x:x.split(' '),l))
l3 = []
for tmp in l2:
    l3.append((int(tmp[1]),int(tmp[0])))
l3.sort() # 앞이 끝나는시간
l4 = [[tmp[1],tmp[0]] for tmp in l3]
#print(l4)

result = [l4[0]]
for i in range(1,len(l4)):
    if l4[i][0] >= result[-1][1]:
        result.append(l4[i])
print(len(result))

cpp로 풀고싶은데..