목차

국영수

ps
링크acmicpc.net/…
출처BOJ
문제 번호10825
문제명국영수
레벨실버 4
분류

기초

시간복잡도O(nlogn)
인풋사이즈n<=100,000
사용한 언어Python
제출기록87004KB / 528ms
최고기록304ms
해결날짜2022/04/09

풀이

코드

"""Solution code for "BOJ 10825. 국영수".

- Problem link: https://www.acmicpc.net/problem/10825
- Solution link: http://www.teferi.net/ps/problems/boj/10825
"""

import sys


def main():
    N = int(sys.stdin.readline())
    students = [sys.stdin.readline().split() for _ in range(N)]
    students.sort(key=lambda x: (-int(x[1]), int(x[2]), -int(x[3]), x[0]))
    print('\n'.join(name for name, *_ in students))


if __name__ == '__main__':
    main()