import sys
input = sys.stdin.readline # 빠른 입력
total_num = int(input())
total_list = [[] for _ in range(200001)] # 총 20만개
for _ in range(total_num):
a, b = map(int, input().split())
a += 100000 # -100000이 0번 인덱스에 오도록 함
total_list[a].append(b) # x위치가 인덱스, y위치가 값
for i in range(0, 200001):
if total_list[i]:
total_list[i] = sorted(total_list[i]) # 출력을 위한 정렬
for j in total_list[i]:
print(i - 100000, j)
'Coding Test Practice > python' 카테고리의 다른 글
(Python) 백준 10773 / 제로 (0) | 2024.04.19 |
---|---|
(Python) 백준 11651 / 좌표 정렬하기 2 (0) | 2024.04.19 |
(Python) 백준 11866 / 요세푸스 문제 0 (0) | 2024.04.19 |
(Python) 백준 10816 / 숫자 카드 2 (0) | 2024.04.19 |
(Python) 백준 10866 / 덱 (0) | 2024.04.19 |