We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ddd925 commit c567650Copy full SHA for c567650
1 file changed
이티예원/1931_회의실 배정
@@ -0,0 +1,21 @@
1
+N = int(input())
2
+time = []
3
+
4
5
+for i in range(N):
6
+ start, end = map(int, input().split())
7
+ time.append([start, end])
8
9
10
+time = sorted(time, key = lambda a : a[0])
11
+time = sorted(time, key = lambda a : a[1])
12
13
+finish = 0
14
+cnt = 0
15
16
+for start, end in time:
17
+ if start >= finish:
18
+ cnt += 1
19
+ finish = end
20
21
+print(cnt)
0 commit comments