BOJ - 10825 - 국영수

Updated:

import sys

def solution():
    N = int(input())

    data = []
    
    for _ in range(N):
        data.append(list(map(str,sys.stdin.readline().split())))

    data.sort(key=lambda x: (-int(x[1]), int(x[2]), -int(x[3]), x[0]))

    for i in range(N):
        print(data[i][0])

solution()

https://www.acmicpc.net/problem/10825

Categories:

Updated:

Leave a comment