Problem D
The Professor's Gradebook
Every year, ambitious students head to The University of Chicago eager to pursue degrees in Computer Science. While knowledge itself is the greatest reward for a quarter of diligent scholarship, students still receive a grade for each course.
Professor X teaches several rigorous introductory computer
science courses, all of which have some number of assignments
and a final exam. Each assignment can receive a score between
When calculating a student’s final grade, the lowest
assignment score is dropped. If there are multiple assignments
with the same lowest score, only one is dropped (the one to
drop can be selected arbitrarily). So, if the class has
where
Yes, at least one student each quarter will receive a
Professor X then takes
Once Professor X has
-
A:
-
B:
-
C:
-
D:
-
F:
In this problem, you will compute
Input
The input contains a list of students with their scores in
the assignments and the exam. The input begins with a line
containing two integers separated by a single space: the number
of students
This line is followed by
Output
The output is composed of
Sample Input 1 | Sample Output 1 |
---|---|
3 11 AB 1 2 3 4 3 2 3 3 2 1 2 35 CD 0 0 1 3 2 2 0 1 1 2 3 25 EF 5 4 4 3 4 5 1 3 3 5 4 40 |
AB 60 75 C CD 40 50 F EF 80 100 A |
Sample Input 2 | Sample Output 2 |
---|---|
3 6 MB 1 2 3 4 3 5 43 BD 0 0 1 2 3 1 25 CT 5 5 5 5 5 5 40 |
MB 60 93 A BD 32 50 F CT 65 100 A |
Sample Input 3 | Sample Output 3 |
---|---|
5 8 BJ 5 3 2 2 5 0 1 2 32 EA 0 5 2 2 3 5 5 0 40 ZN 2 2 3 3 5 4 5 3 48 IZ 1 4 4 3 1 4 3 2 37 LD 0 5 2 3 5 2 4 5 42 |
BJ 52 72 C EA 62 85 B ZN 73 100 A IZ 58 80 B LD 68 94 A |