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()