2DArray1
Submit solution
C
Points:
10 (partial)
Time limit:
8.0s
Memory limit:
64M
Author:
Problem type
Allowed languages
Given a 2D matrix, your task is to take a path from cell (0,0) to cell (N-1,N-1) in such a way that the sum of elements in the path is maximum. But there is a restriction on the moves that you can take: From one element you could move to the immediate bottom cell or to the immediate right cell.
Sample Input1
2
3
7
9
8
Sample Output1
20
Explanation
The first line in the sample input is the size of matrix. Followed by that are the values of matrix. The path is 3 -> 9(bottom value) -> 8(right to 9), 3+9+8=20
Comments