알고리즘 문제 풀기/BOJ
BOJ 1931 - 회의실배정
bug_maker
2019. 12. 25. 16:04
https://www.acmicpc.net/problem/1931
BOJ 1931 - 회의실배정
작성언어: Python3
xxxxxxxxxxn = int(input())conf = []for i in range(n): conf.append(list(map(int, input().split())))conf.sort(key=lambda x : [x[1],x[0]])cnt = 1j = 0for i in range(1, len(conf)): if(conf[i][0] >= conf[j][1]): cnt += 1 j = iprint(cnt)pc 환경에서 코드를 보는 것을 권장합니다.