Skip to content

Commit 8623006

Browse files
committed
[BOJ] 7568 덩치 (S5)
1 parent 59a5519 commit 8623006

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

심수연/7주차/260210.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# https://www.acmicpc.net/problem/7568
2+
3+
import sys
4+
input = sys.stdin.readline
5+
6+
N = int(input())
7+
8+
arr = []
9+
10+
for i in range(N):
11+
arr.append(list(map(int, input().split())))
12+
13+
# [[55, 185], [58, 183], [88, 186], [60, 175], [46, 155]]
14+
15+
rank = [1 for _ in range(N)]
16+
17+
# 자기(j)보다 덩치 큰 사람 있으면 등수를 + 1씩 하면 됨
18+
for i in range(N):
19+
for j in range(N):
20+
if arr[i][0] > arr[j][0] and arr[i][1] > arr[j][1]:
21+
rank[j] += 1
22+
23+
print(*rank)

0 commit comments

Comments
 (0)