class point: def __init__(self, x, y): self.x = x self.y = y def __str__(self): return f'{self.x} {self.y}\n' def __lt__(self, other): return self.x < other.x if not self.x == other.x else self.y < other.y try: while True: a = int(input()) q = [] for i in range(a): z = [int(i) for i in input().split(' ')] q.append(point(z[0], z[1])) q.sort() print(''.join(str(i) for i in q), end="") except EOFError: pass
參考了#21547之後然後用python寫出來的東西