# 신입사원
from sys import stdin
t = int(stdin.readline()) # 테스트 케이스 개수 1~20
for i in range(t):
cnt = 1
n = int(stdin.readline()) # 지원자의 숫자
people = []
for j in range(n):
paper, interview = list(map(int, stdin.readline().split()))
people.append([paper, interview])
people.sort()
res = people[0][1]
for j in range(n):
if people[j][1] < res:
cnt += 1
res = people[j][1]
print(cnt)
[파이썬] 백준 1920: 수 찾기 (이진 탐색) (0) | 2021.08.28 |
---|---|
[파이썬] 백준 2920: 음계 (구현) (0) | 2021.08.28 |
[파이썬] 백준 1924: 2007년 (구현) (0) | 2021.08.28 |
[파이썬] 백준 1316: 그룹 단어 체커 (구현, 문자열) (0) | 2021.08.28 |
[파이썬] 백준 1157: 단어 공부 (구현, 문자열) (0) | 2021.08.28 |