#K39127. Finding the Top Participant
Finding the Top Participant
Finding the Top Participant
In this problem, you are given information about several participants and their performance on a series of problems. Each participant's record consists of their name and a sequence of results represented as 0s and 1s, where (1) indicates a correct answer and (0) indicates an incorrect one. Your task is to determine the participant who has the highest number of correct answers. In case two or more participants have the same number of correct answers, select the one who appears first in the input.
The maximum number of correct answers can be represented as (\max{c_i}), where (c_i) is the count of correct answers for the (i)-th participant.
inputFormat
The first line of input contains an integer (m) representing the number of participants. Each of the following (m) lines contains a participant's name followed by their problem results as space-separated integers (either 0 or 1).
outputFormat
Output a single line containing the name of the participant with the highest number of correct answers.## sample
3
Alice 1 0 1 0 1
Bob 0 0 0 0 1
Charlie 1 1 1 0 0
Alice