| 
 
 
 | Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб. Question by Ibrahim Mesecan.
 
 
   Number of Student CertificatesDirector 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 certificatelower limit for High Success certificate Output specification: Show two integers
 
The number of students who had Excellence certificateThe number of students who had High Success certificate 
  Explanation: Student averages are:| Sample Input I 
 
1067 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
 |  
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.
80.8380.718486.568.574.1479.578369.8388.43
 
 Для отправки решений необходимо выполнить вход.
 
 
 |