文件名称:ProgramA
介绍说明--下载内容均来自于网络,请自行研究使用
skiing
时间限制:3000 ms | 内存限制:65535 KB
难度:5
描述
Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子
1 2 3 4 5
16 17 18 19 6
15 24 25 20 7
14 23 22 21 8
13 12 11 10 9
一个人可以从某个点滑向上下左右相邻四个点之一,当且仅当高度减小。在上面的例子中,一条可滑行的滑坡为24-17-16-1。当然25-24-23-...-3-2-1更长。事实上,这是最长的一条。
输入
第一行表示有几组测试数据,输入的第二行表示区域的行数R和列数C(1 <= R,C <= 100)。下面是R行,每行有C个整数,代表高度h,0<=h<=10000。
后面是下一组数据;
输出
输出最长区域的长度。
样例输入
1
5 5
1 2 3 4 5
16 17 18 19 6
15 24 25 20 7
14 23 22 21 8
13 12 11 10 9
样例输出
25-skiing
Time Limit : 3000 ms | Memory Limit : 65535 KB
Difficulty: 5
Descr iption
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 <=
时间限制:3000 ms | 内存限制:65535 KB
难度:5
描述
Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子
1 2 3 4 5
16 17 18 19 6
15 24 25 20 7
14 23 22 21 8
13 12 11 10 9
一个人可以从某个点滑向上下左右相邻四个点之一,当且仅当高度减小。在上面的例子中,一条可滑行的滑坡为24-17-16-1。当然25-24-23-...-3-2-1更长。事实上,这是最长的一条。
输入
第一行表示有几组测试数据,输入的第二行表示区域的行数R和列数C(1 <= R,C <= 100)。下面是R行,每行有C个整数,代表高度h,0<=h<=10000。
后面是下一组数据;
输出
输出最长区域的长度。
样例输入
1
5 5
1 2 3 4 5
16 17 18 19 6
15 24 25 20 7
14 23 22 21 8
13 12 11 10 9
样例输出
25-skiing
Time Limit : 3000 ms | Memory Limit : 65535 KB
Difficulty: 5
Descr iption
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 <=
(系统自动生成,下载前可以参看下载内容)
下载文件列表
ProgramA.cpp