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

Разделы > Сортировка и последовательности > задача:


51002 - The most successful classes

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

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

• 50992 - Top K Obese Classes
• 50991 - Intersecting Circles
• 50447 - Swimming Contest - 2
• 50513 - Climbing Up the Stairs
• 50744 - The Smallest Perimeter
• 50743 - Total Scholarships Discount
• 50984 - Top m hardworking employees
• 50847 - The first m trains to leave
• 51002 - The most successful cla...
• Word Puzzle
• 50740 - Service Time - 1
• 50750 - Service Time - 2
• 50347 - Selling Oranges
• 50758 - National Elections - Revisited
• 50754 - Team Standings
• 50358 - Series of Odd Numbers
• 50756 - Average of the Nth Student

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

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

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

The most successful classes

Ministry of Education wants to award the most successful classes throughout the country. After the graduation exams, the class success is calculated by the percentage of the students who are above or equal to certain grade (k) to the number of students in the class (The students whose average is above k is assumed to be successful).

Question: Write a program that reads the student averages for n classes. And it defines the most successful m classes.

Input specification: In the first line, you will be given three integers: the number of classes (n), the number of top (m) classes to list and the lower limit (k) of success for students. The following n lines contain at most 60 grades followed by commas. The last student grade is followed by a semicolon where 1 ≤ m ≤ n ≤ 20,000. k and the student grades are integers between 1 and 10,000.

Output specification: Show the ids (order of appearance) of the most successful m classes. If the success of two classes are the same (use 4-digit precision, 0.0001), show the class with the smaller id first.

Sample Input
5 2 76
54, 81, 76, 95, 68, 69, 41;
78, 52, 65, 40;
91, 72, 97, 81, 78;
50, 52, 78, 77, 96, 96, 41;
78, 74, 59;

Sample Output
3 4

Explanation: There are 5 classes. The table below shows the success percentages of classes.

Class ID # successful students Percentage
1 3 42.86%
2 1 25%
3 4 80%
4 4 57.14%
5 1 33.33%
There are 3 students above k (76) in the first class, etc. And thus, the classes 3 and 4 are the most successful two classes.



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

www.contester.ru