1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 import sys input = sys.stdin.readline testcase = int(input()) for t in range(testcase) : n = int(input()) l = [] for i in range(n) : l.append(list(map(int, input().split()))) l.sort() top = sys.maxsize count = 0 for a, b in l : if b