← Back to List

20949번: 효정과 새 모니터 ↗

Solutions

Python 3
168 B | 168 chars
L = []

for i in range(int(input())):
  w,h = map(int, input().split())
  L.append([w*w+h*h, i])

for i in sorted(L, key = lambda t : (-t[0], t[1])):
  print(i[1] + 1)