BOJ - 2535 - 아시아 정보올림피아드

Updated:

import sys

def solution():
    N = int(input())
    student = []
    for _ in range(N):
        student.append(list(map(int, sys.stdin.readline().split())))

    student = sorted(student, key=lambda x:-x[2])
    print(student[0][0], student[0][1])
    print(student[1][0], student[1][1])

    if student[0][0] == student[1][0]: print(student[3][0], student[3][1])
    else: print(student[2][0], student[2][1])
solution()

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

Categories:

Updated:

Leave a comment