[python] 구름레벨 구름스퀘어 오답노트

김보현·2024년 7월 2일
0

PS

목록 보기
49/62
import sys
input = sys.stdin.readline
n = int(input())
sche = []
for i in range(n):
	s, e = map(int, input().split())
	sche.append([s,e])
st = 0
ed = 0

sche.sort(key=lambda x: (x[1],x[0]))
for s, e in sche:
	if s > ed:
		st += 1
		ed = e
print(st)

x[1] 끝나는 시간이 더 빠른 것을 선택한다..
lambda 활용능력을 더 길러야 할 것 같다..

profile
Fall in love with Computer Vision

0개의 댓글

관련 채용 정보