728x90
import sys
def solution():
n = int(sys.stdin.readline().strip())
answer = []
for _ in range(n):
x, y = map(int, sys.stdin.readline().split())
answer.append((x, y))
answer.sort(key=lambda x : (x[0], x[1]))
for a, b in answer:
print(a, b)
solution()
728x90
'[Coding Test] > [백준]' 카테고리의 다른 글
[백준] 11724: 연결 요소의 개수 (0) | 2022.07.08 |
---|---|
[백준] 1929 파이썬(python) : 소수 구하기 - (에라토스테네스의 체) (0) | 2022.07.05 |
[백준] 2164: 카드2 (0) | 2022.07.04 |
[백준] 1181: 단어 정렬 (0) | 2022.07.03 |
[백준] 1157: 단어 공부 (0) | 2022.07.02 |