implement: 덩치 (백준)

이진솔·2022년 2월 14일
0
post-thumbnail
n = int(input()) # 인원수 입력받기 
a = [] #키,몸무게 리스트 초기화 
result = []


#키,몸무게 리스트 입력받기 
for i in range(n):
    a.append(list(map(int,input().split()))) 

for j in range(n): 
    sum = 0 
    for k in range(n): 
        if a[j][0] < a[k][0] and a[j][1] < a[k][1]:
            sum += 1
    result.append(sum+1) 
           
for i in result:
    print(i, end=" ") #줄바꿈 없이 출력하기 
profile
"Hello Jinsol World"💛

0개의 댓글