#t546. 最厉害的学生
最厉害的学生
The Best Student
Problem Description
There are students who took the final exam, and we have each student's information: name (a string of only lowercase English letters, length at most ), and their Chinese, Math, and English scores (all natural numbers not exceeding ). The student with the highest total score is the best; output the best student's information (name and each subject's score). If several students tie for the highest total, output the one who appears earliest.
Input Format
The first line contains a positive integer , the number of students.
The following lines each begin with a string (the student's name), followed by three natural numbers: the Chinese, Math, and English scores, separated by spaces.
Output Format
One line containing the best student's name, Chinese score, Math score, and English score, separated by spaces.
Sample Input
3
senpai 114 51 4
lxl 114 10 23
fafa 51 42 60
Sample Output
senpai 114 51 4
Sample Explanation
There are students in the sample. senpai's three scores are , , , total ; lxl's are , , , total ; fafa's are , , , total . senpai has the highest total, so we output senpai's name, Chinese score , Math score , and English score , as shown above.
Constraints
. The name is a string of only lowercase English letters with length at most . The Chinese, Math, and English scores are natural numbers not exceeding .