import sys
dic={}
for x in range(int(sys.stdin.readline())):
a,b=map(int,sys.stdin.readline().split())
if a not in dic:
dic[a]=[]
dic[a].append(b)
else:dic[a].append(b)
for x,y in sorted(dic.items()):
for _ in sorted(y):
print(x,_)
'알고리즘 > 백준' 카테고리의 다른 글
백준-11653번(소인수분해)-python3 (0) | 2023.11.30 |
---|---|
백준-11651번(좌표 정렬하기)-python3 (0) | 2023.11.30 |
백준-11557번(Yangjojang of The Year)-python3 (0) | 2023.11.30 |
백준-11279번(최대 힙)-python3 (0) | 2023.11.30 |
백준-11047번(동전 0)-python3 (0) | 2023.11.30 |