A 와 B의 덩치가 각각 (x, y), (p, q)라고 할 때 x > p 그리고 y > q 이라면 우리는 A의 덩치가 B의 덩치보다 "더 크다"고 말한다.
덩치 등수를 출력하는 문제다!
import sys
n = int(sys.stdin.readline())
height = []
weight = []
for i in range(n):
x, y = map(int, sys.stdin.readline().split())
height.append(x)
weight.append(y)
for i in range(n):
cnt = 1
for j in range(n):
if height[i] < height[j] and weight[i] < weight[j]:
cnt += 1
print(cnt, end=' ')
입력되는 N의 값이 크지 않아서 쉽게 해결할 수 있었던 문제다:D