IMPC16 Group Contests |
Start: Jan.16.2016 at 10:00:00 AM
Finish: Jan.16.2016 at 02:00:00 PM
The contest is finished!
• Contest scoreboard
|
Feedback | If you notice incorrect translations in Contester, please let author know.
|
|
Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb. Question by Ibrahim Mesecan.
Number of Student Certificates
Director of South East Tirana primary school is asking
a special program from you. The school gives two types of
special certificates: High Success and Excellence certificates.
The lower limits of the certificates are decided every year
according to student averages and they are given at the end
of student grades. The students have grades from
7 lessons. However, some students are exempted from some
lessons. If a student is exempted from more than 1 lesson,
he cannot take Excellence certificate. And if a student is
exempted from more than 2 lessons, he cannot take high
success certificate.
Question:
Write a program that reads student grades and
counts the number of students taking certificates.
Input specification
You will be first given a number (n) the number
students where 0 ≤ n ≤ 2000. Then, in the
following n lines you will be given the grades
of n students: at most 7 integers. If there are
less than 7 grades, it ends with a negative
number where each grade is an integer between
0 and 100. Then, you will be given two floating
point numbers:
- lower limit for Excellence certificate
- lower limit for High Success certificate
Output specification:
Show two integers
- The number of students who had Excellence certificate
- The number of students who had High Success certificate
Sample Input I
10
67 91 91 61 100 75 -1
66 89 54 82 99 100 75
90 79 76 100 75 -1
68 100 82 96 -1
77 62 63 68 51 90 -1
66 52 81 74 92 62 92
89 80 67 81 72 91 77
98 75 94 74 74 96 70
88 56 71 98 55 51 -1
98 72 94 80 96 98 81
83 75
|
Sample Output I
2 4
|
Explanation: Student averages are:
- 80.83
- 80.71
- 84
- 86.5
- 68.5
- 74.14
- 79.57
- 83
- 69.83
- 88.43
Students 1,2, 3 and 7 receive High Success certificates.
And students 8 and 10 receive Excellence certificates.
Third student is exempted from 2 lessons and fourth student
is exempted from 3 lessons. Although student 3 has higher
average than Excellence certificate, he cannot take because
he has 2 lessons exempted. But he can take High Success
certificate. Student 4 is exempted from 3 lessons,
so he cannot receive any certificate.
Для отправки решений необходимо выполнить вход.
|