#t547. 学生优秀判定
学生优秀判定
Determining Excellent Students
Problem Description
There are students. For each student we need to record, using a struct, the following information: student ID, academic score, and extracurricular score, plus a comprehensive score (a real number). For each line of input you read a student's ID, academic score, and extracurricular score, and compute the comprehensive score (weighted sum with and respectively), storing it in the struct. The struct should also define a member function that returns the sum of the academic score and the extracurricular score for that student object.
Then you need to write a function that takes a student struct object and determines whether the student is "excellent". A student is excellent if the sum of the academic and extracurricular scores is greater than , and the comprehensive score is no less than .
Of course this problem is easy; it only serves to help you practice using structs.
This problem has a precision issue: convert the comparison of with into the comparison of with .
Input Format
The first line contains an integer .
The next lines each contain 3 integers, representing the student ID, academic score, and extracurricular score in order.
Output Format
Output lines. If the -th student is excellent, output Excellent; otherwise output Not excellent.
Sample Input
4
1223 95 59
1224 50 7
1473 32 45
1556 86 99
Sample Output
Excellent
Not excellent
Not excellent
Excellent
Sample Explanation
There are students in the first sample.
- Student 1: ID 1223, academic 95, extracurricular 59. Sum = ; comprehensive score = $95 \times 0.7 + 59 \times 0.3 = 66.5 + 17.7 = 84.2 \ge 80$, so output
Excellent. - Student 2: ID 1224, academic 50, extracurricular 7. Sum = , so output
Not excellent. - Student 3: ID 1473, academic 32, extracurricular 45. Sum = , so output
Not excellent. - Student 4: ID 1556, academic 86, extracurricular 99. Sum = ; comprehensive score = $86 \times 0.7 + 99 \times 0.3 = 60.2 + 29.7 = 89.9 \ge 80$, so output
Excellent.
Finally output lines in input order: Excellent, Not excellent, Not excellent, Excellent.
Constraints
It is guaranteed that , the student ID is a positive integer not exceeding , and the academic and extracurricular scores are integers in the range .