728x90
wh = []
result = []
N = int(input())
for _ in range(N):
w, h = map(int, input().split())
wh.append((w, h))
for i in range(N):
rank = 0
for j in range(N):
if (wh[i][0] < wh[j][0]) and (wh[i][1] < wh[j][1]):
rank += 1
result.append(rank + 1)
print(*result, sep=' ')
반응형
LIST