문제링크 : https://school.programmers.co.kr/learn/courses/30/lessons/152995
def solution(scores):
wanho = scores[0]
scores.sort(key=lambda x:(-x[0], x[1]))
rank = 1
tmp = 0
for score in scores:
if wanho[0] < score[0] and wanho[1] < score[1]:
return -1
if sum(wanho) < sum(score) and tmp <= score[1]:
rank += 1
tmp = score[1]
return rank