SEM 2 - W3 |
Старт: 21.мар.2023 в 16:30:12
Финиш: 27.мар.2023 в 20:30:12
Турнир завершён!
• Турнирная таблица
|
|
Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 200000/16000/2000/2000 Кб. Question by Ibrahim Mesecan.
Row Min Subtraction
In a research, your professor has realized that the data
he is working on has some noise. For this reason,
he wants to subtract
the smallest value of every row from the row elements.
As a result, the smallest number of every row will be 0.
Question: Write a program that is going to
get n rows of m numbers. Then, the program will subtract
the smallest value of every row from the row elements.
Note: Pay attention that there is memory
limit in this question.
Input specification
In the beginning, you will be given 2 integers:
- the number of rows (n): an integer between 0 and 5000
- the number of numbers in every row (m): an integer between
0 and 1000
then in the following n lines you will be given m integers
which are between -10000 and 10000.
Output specification
Show m integers in n lines.
Sample Input I
3 6
5 6 1 6 1 7
10 5 15 24 13 12
9 4 16 6 7 15
|
Sample Output I
4 5 0 5 0 6
5 0 10 19 8 7
5 0 12 2 3 11
|
Explanation:
The min of first row is 1, thus, 1 has been subtracted
from the first row elements. The min of the second row is
5. Similarly, 5 has been subtracted from the second row
elements...
Для отправки решений необходимо выполнить вход.
|