Description: skiing
Time Limit : 3000 ms | Memory Limit : 65535 KB
Difficulty: 5
Description
Michael likes to ski one hundred This is not surprising , because skiing is very exciting. However, in order to gain speed , the area must be downward slide , and when you slide into the base , you have to lift up the grade again or wait for you to upload . Michael wanted to know an area set up at the end landslide . Given by a two-dimensional area array . Each number represents the height of the point of the array . Here is an example
12345
161718196
152425207
142322218
131211109
A person can slide up and down from a point adjacent to one of the four points , and only when the height is reduced. In the above example , one can slide the sliding 24-17-16-1 . Of course 25-24-23- ...-3-2-1 longer. In fact, this is the longest one .
Enter
The first line indicates that there are several sets of test data, the second line of the input area , said the number of rows and columns R C (1 <=
To Search:
File list (Check if you may need any files):
ProgramA.cpp