백준
백준 11650번 어떻게 풀었나. lambda 사용
kimbro6
2023. 1. 9. 00:01
- 푼 방법
- 백준 1181번과 비슷한 문제여서 그대로 품
- 백준 1181번 풀이 : https://developer-commit.tistory.com/46
코드
import sys
N = int(sys.stdin.readline())
A = [list(map(int, sys.stdin.readline().rstrip().split())) for _ in range(N)]
A.sort(key=lambda x : (x[0], x[1]))
for i in A:
print(i[0], i[1])