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

Сборники > Kovrov IT > задача:


50802 - Comparing Exams

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

Задачи сборника

• 50509 - Reading Book
• 50529 - Row to Table
• 50786 - Top Question
• 50788 - Eight Puzzle
• 50499 - Table to Row
• 50823 - Secret Number
• 50853 - Parking Place
• 50496 - Falling Bricks
• 50802 - Comparing Exams
• 50517 - Confusion Matrix
• 50866 - Buy the cheapest
• 50785 - Swimming Contest
• 51011 - Decoding the Path
• 50515 - Lines - Revisited
• 50999 - Overlapping Trips
• 50507 - Sequential Numbers
• 50449 - The biggest result

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

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

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

Comparing Exams

Exam preparation agency (EPA) from the ministry wants to test the quality of exams. And you are assigned to prepare one section of this analysis. You will prepare a list according to the following criteria where success of an exam for the results of k students is the sum of the absolute differences of each grade from the class average.

The higher is the better.

Question: Write a program that is going to calculate the success of n exams and sort them in descending order and show the ids of top m exams.

Input specification
In the first line, you will be given three numbers: The number of exams(n) and the number of students (k), The number of top exams to show (m). Then, in the following n lines, you will be given k integers which are between -10,000 and 10,000 and 1 ≤ m ≤ n ≤ 20,000 and 1 ≤ k ≤ 2,000.

Output specification
Show ids of top m exams.If there are two exams with the same result show the exam with a smaller id first.

Sample Input I
3 3 2
9 10 8
9 6 3
10 7 10
Sample Output I
2 3

The class averages are 9, 6 and 9. The sum of absolute differences of each grade from the class average:

  1. For the first exam: 0 + 1 + 1 = 2
  2. For the second exam: 3 + 0 + 3 = 6
  3. For the third exam: 1 + 2 + 1 = 4
Then the sorted list of exams will 2, 3 and 1.



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

www.contester.ru