-->
当前位置:首页 > 题库

PROGRAMMING:Treasure hunt

Luz5年前 (2021-05-10)题库458
Xiaoming has a treasure map with m * n rooms on it. There is a valuable treasure in each room. Xiaoming can only enter from the room in the upper left corner to collect treasure, and can only continue to search for treasure from the room on the right or below each time, and finally can only come out from the room on the bottom right. Please help Xiao Ming calculate the most valuable treasures he can collect?
###Input format:
Input the first line to give two positive integers m, n (1 = < m, n < = 2000), and then give m lines of data, each line contains n positive integers, with space in the middle.
###Output format:
Output the maximum value of the collection V, and ensure that V < 10 ^ 9.
###Input example:
```in
4 4
1 18 9 3
7 10 6 12
5 13 4 15
2 11 8 16
```
###Output example:
```out
seventy-eight
```







answer:If there is no answer, please comment