Partial matrix sum
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
The matrix of integers is given, where . For all compute the partial sums
Input
The first line contains the matrix size and . Then follows the description of the matrix : each of the next lines contains integers.
Output
Print the matrix of partial sums : rows with integers each.
Examples
Input #1
Answer #1
Submissions 7K
Acceptance rate 50%