https://www.acmicpc.net/problem/11650
from sys import stdin
N = int(stdin.readline())
coords = []
for _ in range(N):
x, y = map(int, stdin.readline().split())
coords.append((x, y))
coords.sort(key = lambda x: (x[0], x[1]))
for x, y in coords:
print(x, y)
입력받은 좌표들을 sort() 의 lambda 식을 이용
x 좌표 -> y 좌표 의 우선순위로 정렬

https://www.acmicpc.net/problem/11286
from sys import stdin
import heapq
N = int(stdin.readline())
heap = []
for _ in range(N):
x = int(stdin.readline())
if x == 0:
if heap:
h = heapq.heappop(heap)
print(h[1])
else:
print(0)
else:
heapq.heappush(heap, (abs(x), x))
최대힙을 저장하듯이 (절댓값, 값) 으로 묶어서 저장
=> 절댓값을 기준으로 정렬
출력할 때는 원래 값을 출력 => h[1]
