from sys import stdin
input = stdin.readline
n = int(input())
graph = []
for i in range(n):
graph.append(list(map(int, input().split())))
graph.sort()
count = 0
for i in range(n):
count = 0
j = i + 1
if j <= n:
while i <= n-1:
if graph[i][1] <= graph[j][0]:
count += 1
i = j
j += 1
[파이썬] 백준 1157: 단어 공부 (구현, 문자열) (0) | 2021.08.28 |
---|---|
[파이썬] 백준 1152: 단어의 개수 (구현, 문자열) (0) | 2021.08.28 |
[파이썬] 백준 5585: 거스름돈 (그리디 알고리즘) (0) | 2021.08.28 |
[파이썬] 백준 2217: 로프 (그리디 알고리즘) (0) | 2021.08.28 |
[파이썬] 백준 1946: 신입 사원 (그리디 알고리즘) (0) | 2021.08.28 |