#P6408. [COCI 2008/2009 #3] PET
[COCI 2008/2009 #3] PET
Description
In a popular contest called Dinner for Five, there are contestants and judges. The judges score each dish with a number from . Each contestant's total score is the sum of all judges' scores. The contestants are numbered from to in order.
Write a program to output the number of the contestant with the highest score and their score.
Input Format
The input contains lines. Each line has positive integers, representing the scores given by the judges to contestant .
The input guarantees that the winner is unique.
Output Format
Output only line with positive integers separated by one space: the contestant with the highest score and their score.
5 4 4 5
5 4 4 4
5 5 4 4
5 5 5 4
4 4 4 5
4 19
4 4 3 3
5 4 3 5
5 5 2 4
5 5 5 1
4 4 4 4
2 17
Hint
Explanation
This problem is translated from COCI2008-2009 CONTEST #3 T1 PET.
Translated by ChatGPT 5
京公网安备 11011102002149号