Minimum Path Sum
Walk from the top-left to the bottom-right cell of a grid, moving only right or down. Minimise the sum of the cells you visit.
Input
and , then rows of non-negative integers.
Output
The minimum sum.
Constraints
Sample 1
Input
3 3 1 3 1 1 5 1 4 2 1
Output
7