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

Турниры > CEN111 Homeworks 2013-2015 > задача:


14-Fall2-20. 50504 - School contest

CEN111 Homeworks 2013-2015

Старт: 10.янв.2015 в 10:00:00
Финиш: 10.янв.2015 в 15:00:00
Турнир завершён!
• Турнирная таблица

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

Задачи турнира

• 13-Fall2-20. 50399 - Mobile Base Sta...
• 13-Fall2-40. 50401 - Sum of Odd N...
• 13-Fall2-50. 50400 - nth Row rth El...
• 14-Fall1-10. 50532 - Close City
• 14-Fall1-30. 50500 - Find Student
• 14-Fall1-40. 50511 - Class Average
• 14-Fall1-50. 50481 - Car Parking
• 14-Fall2-10. 50510 - What floor are ...
• 14-Fall2-20. 50504 - School con...
• 14-Fall2-30. 50523 - Total Tax to Pay
• 14-Fall2-40. 50514 - Bookkeeping
• 14-Fall2-50. 50534 - Top Trading C...
• 14-Fall2-60. 50487 - Radius of Inscr...
• 14-FallResit-20. 50407 - Missing Nu...
• 14-Spr2-10. 50426 - Calculating Sales
• 14-Spr2-20. 50425 - Calculating W...
• 14-Spr2-30. 50445 - Cryptography

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

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

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Question by Ibrahim Mesecan.

School reading contest

North Tirana Primary school is having a reading contest among students. A total point is calculated for every student who fulfills the minimum requirements from 4 courses. There is also maximum point (m) that students can get.

Weekly, every student has to fulfill the minimum pages from the four defined courses. If a student fulfills the minimum condition from all four courses, then he gets 5, 5, 4, 4 points respectively for every extra page that he reads.

Question: Write a program that is going to read (n) student information and find out the number of students who get the maximum points.

Input specification
In the beginning, you will be given two integers: the number of students (n) and maximum points that a student can get (m) where 0 ≤ n ≤ 1000, 10 ≤ m ≤ 1000. In the second line you will be given the limits of 4 courses. Then, in each of the following n lines you will be given 4 numbers which are between 0 and 500.

Output specification
One integer number: the number of students who has taken at least m points.

Sample Input I
4 200
25 25 30 40
50 0 20 60
40 50 50 60
30 25 40 50
25 35 50 60
Sample Output I
2

Explanation: There are 4 students and maximum points is 200.

  1. The first student has read less pages from the second and third lessons: 0 points
  2. The 2nd and the 4th students have fulfilled the minimum requirements from all lessons and get the max points: 200
  3. The 3rd student has fulfilled the minimum requirements and has got 105 points


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

www.contester.ru