| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 2 초 (추가 시간 없음) | 1024 MB | 1 | 1 | 1 | 100.000% |
You aim to please, or at least you did. Now you are a teacher and you have students asking you to perform certain tasks some of which contradict each other. You want to be objective, but you also want to make your job easier. You will automate parts of your job. The first task is assigning letter grades at the end of the semester.
Several students have sent you emails stating their overall grade in the class as an integer and their desired letter grade. Normally, you would disregard such pleas but, in this case, they have used the magic word “please”. Now you feel that you should cater to some of these requests.
For simplicity, we assume there are five letter grades: A, B, C, D, and F. You will assign letter grade cutoffs such that each letter grade is achievable by some integer overall grade in the range of 0 to 100, inclusive, even if there is no student with that particular integer score. Additionally:
If a student asks for a letter grade, they will be disappointed if they receive any other letter grade (even a higher letter grade), e.g., if a student asks for a B, they will be disappointed if they receive a C or A or … (any grade other than B).
Your grade assignment preference is as follows:
Given the people that have sent emails requesting particular letter grades, their corresponding score, and the number of times they used the word please, determine the best fit letter grade cutoffs following the criteria listed above.
The first input line contains an integer, n (1 ≤ n ≤ 105), representing the number of students. The next n input lines provide information about the students, one student per line. Each of these input lines starts in column 1 and contains three tokens (separated by exactly one space) as follows:
Print four integers on a single line representing the letter grade cutoffs for A, B, C, and D, respectively.
5 90 A 1 88 C 5 85 B 3 50 D 2 89 F 3
90 89 88 50
3 90 B 5 90 A 4 90 A 4
100 90 89 88