Submit | All submissions | Best solutions | Back to list |
EISTULI - Top highest GPA |
Given a list of n students with the following information
- Student ID (a 10-digit integer).
- Student name (including lowercase letters, no spaces, no more than 20 characters).
- Number of courses(integer, no more than 100).
- Highest score of all courses(non-negative integer and no more than 100).
Accordingly, the average score is calculated on courses with scores of not less than 50. Each course is equivalent to 4 credits.
Output a list of no more than k students with the highest GPA.
Input:
The first line is the number of students n (0 < n ≤ 105) and the integer k (0 < k ≤ n).
Each line in the next n lines contains information about a student, student id, name, course number, and course grades.
Output:
Output the list as required, per student per line of student ID, name, GPA rounded to units, and number of credits. The list of students appears in descending order of grades (unrounded score), if the scores are equal, then students should be in the order entered. If two students have the same score, they should be both outputed or none of them is outputed.
Example
|
|
Added by: | Ha Minh Ngoc |
Date: | 2018-03-17 |
Time limit: | 1s-1.299s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: GOSU |