#P2383. Crazy Scavenger

Crazy Scavenger

题目描述

There are many valuable things on top of a rectangular open space, and now there is a scavenger who is so crazy that he has only two ways to move.

1. move down one unit

2. move one unit to the right

He wants to get the maximum sum of values, so please help him!

输入格式

n,m are used to represent the length and width of the rectangular open space, and the value per unit area of the corresponding item is written in the following line.

输出格式

Corresponding to the maximum value.

样例

2 3 
2 3 4 
1 6 5
16

提示

By TOP

There are two groups of test samples, one small sample and one large sample

The data range is 1<=n<=m<=100;ai<=1e7