Submit | All submissions | Best solutions | Back to list |
EIUSLS - Scholarships |
At the end of every quarter, CIT gives scholarships to at most 2 students who achieve the highest average scores. CIT assign Phuc to find out these students. Help him to write a program to find the best students based on the scores
Input
The first line contains an integer n(0 < n <= 1000).
Each line of the next n line indicates a student, starts with a name and the number of courses m, followed by m integers which are the scores of m courses.
Output
Output the name of the selected students. The student with higher score is ranked higher priority. If there are two students have same average score, student should be in the same order as in the input
Tool: https://drive.google.com/file/d/1FGdXodBFJGvNT-NvUxECgx6rycfT9Jpk/view?usp=sharing
Sample
Input5 Dai 2 40 80 Huy 5 60 100 80 90 70 Tan 3 60 50 80 Tu 3 90 90 100 Dung 4 100 80 90 70 |
OutputTu Dung |
Added by: | Ha Minh Ngoc |
Date: | 2015-12-11 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: GOSU |