#B2125. Find the Student with the Highest Score
Find the Student with the Highest Score
Find the Student with the Highest Score
You are given the number of students, followed by each student's score and name. Your task is to determine the name of the student with the highest score.
Input Format:
- The first line contains an integer n, the number of students.
- The following n lines each contain a score and a name separated by a space.
Output Format:
- Output the name of the student with the highest score.
Note: It is guaranteed that there is a unique answer.
inputFormat
The first line contains an integer n. Each of the next n lines contains an integer (the student's score) followed by a string (the student's name).
outputFormat
Output a single line containing the name of the student with the highest score.
sample
3
85 Alice
95 Bob
90 Charlie
Bob