Problem1027--行走方案数 3

1027: 行走方案数 3

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

Description

有一个nn列的方块组,从左上角走到右下角,只能往下走和往右走,每个方块里都有一些数量的食物,请问从开始位置到结束位置最多能取多少食物?

Input

一个整数n,n<=100

n*n个位置的食物数量

Output

能取最多的食物数量

Sample Input Copy

3
1 2 3
4 5 6
7 2 4

Sample Output Copy

20

HINT

最多的食物路线为 1 4 5 6 4 一共20

Source/Category

递推