Skip to content

Commit 414c816

Browse files
authored
[BOJ] 7568 덩치 (S5)
1 parent e66b72d commit 414c816

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

김지호/8주차/260217.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# https://www.acmicpc.net/problem/7568
2+
# 덩치, 실버5
3+
4+
import sys
5+
sys.stdin = open('../../../input.txt', 'r')
6+
7+
T = int(input().strip())
8+
people = []
9+
10+
for _ in range(T):
11+
weight, height = map(int, input().strip().split())
12+
people.append((weight, height))
13+
14+
for weight, height in people:
15+
rank = 1
16+
for cmp_weight, cmp_height in people:
17+
if weight < cmp_weight and height < cmp_height:
18+
rank += 1
19+
print(rank, end=' ')

0 commit comments

Comments
 (0)