선릉역 1번 출구
baekjoon - 1931 본문
백준 1931 - 회의실 배정
https://www.acmicpc.net/problem/1931
n = int(input()) zoom = [] possible_zoom = [] for _ in range(n): zoom.append(list(map(int, input().split()))) zoom.sort() zoom.sort(key = lambda x: x[1]) node = zoom[0] possible_zoom.append(zoom[0]) for i in range(1, n): if node[1] <= zoom[i][0]: possible_zoom.append(zoom[i]) node = zoom[i] print(len(possible_zoom)) |
+2차원 배열 정렬에 대한 포스팅 참고
https://haesoo9410.tistory.com/193
'Algorithm > Algorithm 문제풀이' 카테고리의 다른 글
baekjoon - 2605 (0) | 2021.10.03 |
---|---|
baekjoon - 11866 (0) | 2021.10.03 |
baekjoon - 2161 (0) | 2021.10.03 |
baekjoon - 15886 (0) | 2021.10.03 |
baekjoon - 14467 (0) | 2021.10.03 |
Comments