ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Разделы > Поиск > задача:


50860 - Number of Student Certificates

Гость
• Вопросы к жюри (3)

Задачи раздела

• 50785 - Swimming Contest
• 50826 - Olive Containers
• 50866 - Buy the cheapest
• 50999 - Overlapping Trips
• 50507 - Sequential Numbers
• 50501 - The Highest Average
• 50434 - Row Min Subtraction
• 50980 - The smallest rectangle
• 50860 - Number of Student Cert...
• 50832 - Rock Paper Scissors Lizard ...
• 50834 - The train which leaves the f...
• 51078 - Max trade
• 51056 - Welcome Picnic
• 51055 - The competition
• 51077 - Grades Histogram
• 51057 - Number of students
• 51046 - The biggest number

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
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:
  1. 80.83
  2. 80.71
  3. 84
  4. 86.5
  5. 68.5
  6. 74.14
  7. 79.57
  8. 83
  9. 69.83
  10. 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.



Для отправки решений необходимо выполнить вход.

www.contester.ru