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

Турниры > CEN303_2016Questions > задача:


HW012. 51009 - Sum of the nth row

CEN303_2016Questions

Старт: 28.окт.2016 в 17:00:00
Финиш: 01.ноя.2016 в 05:00:00
Турнир завершён!
• Турнирная таблица

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

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

• FE1. 51076 - Key person
• FE2. 50988 - Laplacian Filter
• FE3. 51075 - Shortest Path for Bishop
• HW011. 51008 - Sum of Regional M...
• HW012. 51009 - Sum of the nth ...
• HW021. 51011 - Decoding the Path
• HW022. 51012 - Palindrome-k
• HW023. 50741 - DNA Distance
• HW031. 51015 - Student Scholarships
• HW032. 51014 - Nine Men's Morris g...
• HW033. 50925 - Optimizing Elevator...
• HW051. 51019 - Finding the hidden...
• HW052. 51020 - Number of nodes r...

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

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

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

Sum of the nth row

Question: You are given information about n objects in a matrix. The information for every object is stored in the columns. Write a program that sorts every column, and then, the program calculates and returns sum of nth row from the matrix.

Input specification: You will be given three integers in the beginning: size of matrix (rows-r and cols-c) and then the number of row (n) to calculate the sum where 1 < n ≤ (r and c) ≤ 200. Then, each of the following r lines contains c integers which are between -2e4 and +2e4.

Output specification: Show one integer.

Sample Input
5 6 3
0 8 1 1 10 6
6 8 7 0 3 9
0 7 6 8 6 5
4 0 2 7 2 0
4 4 5 7 5 1
Sample Output
33

Explanation: Here is the matrix sorted in ascending order according to the columns.
  0 0 1 0 2 0
  0 4 2 1 3 1
  4 7 5 7 5 5
  4 8 6 7 6 6
  6 8 7 8 10 9
Then, the third row contains the numbers 4 7 5 7 5 5. And the sum of the numbers is 33.



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

www.contester.ru