提交时间:2024-11-08 12:05:58

运行 ID: 55542

n = int(input()) students = [] for _ in range(n): students.append(input().split()) sorted_students = sorted(students, key=lambda x: (-int(x[1]), x[0])) for student in sorted_students: print(f"{student[0]} {student[1]}")