====== 최소 회의실 개수 ====== ===== 풀이 ===== * [[ps:problems:boj:11000]]과 n의 범위를 제외하고 동일한 문제. 풀이도 동일하니 그쪽을 참조. ===== 코드 ===== """Solution code for "BOJ 19598. 최소 회의실 개수". - Problem link: https://www.acmicpc.net/problem/19598 - Solution link: http://www.teferi.net/ps/problems/boj/19598 Tags: [Sweeping] """ import sys FINISH = 0 START = 1 def main(): N = int(sys.stdin.readline()) times = [] for _ in range(N): start, finish = [int(x) for x in sys.stdin.readline().split()] times.append((start, START)) times.append((finish, FINISH)) count = 0 answer = max((count := count + (1 if event == START else -1)) for _, event in sorted(times)) print(answer) if __name__ == '__main__': main() {{tag>BOJ ps:problems:boj:골드_3 ps:teflib:linear_homogeneous_recurrence}}