-->
当前位置:首页 > 题库

PROGRAMMING:Who won the most scholarships

Luz5年前 (2021-05-10)题库415
###Title Description
It is customary for a school to grant scholarships after the final examination of each semester. There are five kinds of scholarships, and the conditions are different
1) Academician scholarship, 8000 yuan per person, with a final average score of more than 80 (> 80), and students who have published one or more papers in this semester can get it;
2) May 4th scholarship, 4000 yuan per person, the final average score is higher than 85 (> 85), and the class evaluation score is higher than 80 (> 80);
3) Excellent achievement award, 2000 yuan per person, students whose final average score is higher than 90 (> 90) can get it;
4) Western scholarship, 1000 yuan per person, students from western provinces whose final average score is higher than 85 (> 85) can get it;
5) The class contribution award is 850 yuan per person, and the student leaders whose class evaluation score is higher than 80 (> 80) can get it;
As long as they meet the conditions, they can win prizes. There is no limit to the number of winners of each scholarship. Each student can also get multiple scholarships at the same time. For example, Yao Lin's final average score is 87 points, and his class appraisal score is 82 points. At the same time, he is a student cadre, so he can win the May 4th scholarship and the class contribution award at the same time. The total bonus is 4850 yuan.
Now, given the relevant data of some students, please calculate which students get the highest total bonus (assuming that there are always students who can meet the conditions of scholarship).
###Enter a description
The first line is an integer n (1 < = n < = 100), representing the total number of students. In the next n rows, each row is the data of a student. From left to right, they are the name, final average score, class evaluation score, whether they are student leaders, whether they are students from western provinces, and the number of papers published. The name is a string of no more than 20 in length (excluding spaces) composed of upper and lower case English letters; The final grade average and class evaluation grade are integers between 0 and 100 (including 0 and 100); Whether they are student cadres or not and whether they are students from western provinces are indicated by one character respectively. Y means yes and N means No; The number of published papers is an integer from 0 to 10 (including 0 and 10). Every two adjacent data items are separated by a space.
###Output description
It consists of three lines. The first line is the name of the student who received the most money, and the second line is the total number of money the student received. If there are two or more students who get the most bonus, output the name of the earliest student among them in the input file. The third line is the total number of scholarships for these n students.
###Sample input
```in
four
YaoLin 87 82 Y N 0
ChenRuiyi 88 78 N Y 1
LiXin 92 88 N N 0
ZhangQin 83 87 Y N 1
```
###Sample output
```out
ChenRuiyi
nine thousand
twenty-eight thousand and seven hundred
```
###Title Source
Note: selected from openjudge website, online address: http://noi.openjudge.cn/ch0109/04/






answer:If there is no answer, please comment