第2题,深信服旅游那个,当时自己是觉得以为是合并区间,就想到力扣那个戳爆气球那个题,这样写的,但是不正确,但是一直没想通错哪了,大佬们可帮忙看下么? if __name__ == '__main__&(31187)#39;: T = int(input()) while T: N = int(input()) times = [] for i in range(N): time = list(map(int, input().split(" "))) times.append(time) times.sort(key=lambda x: x[1]) needs = [times[0]] ans, cnt = 1, 1 for i in range(1, len(times)): if times[i][0] > needs[-1][1]: needs.append(times[i]) cnt = 1 else: needs[-1][0] = max(needs[-1][0], times[i][0]) needs[-1][1] = min(needs[-1][1], times[i][1]) cnt += 1 ans = max(ans, cnt) print(ans) T -= 1