文件名称:huaxuewenti
介绍说明--下载内容均来自于网络,请自行研究使用
滑雪中,是为了获得速度,滑的区域必须向下倾斜。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更长。事实上,这是最长的一条。
-
Skiing in order to gain speed, the area must slope downward slide. Michael wants to know the end of the longest in a landslide area. Region is given by a two-dimensional array. Each number represents an array of point level. Here is an example
12345
161,718,196
152,425,207
142,322,218
131,211,109
A person can slide up and down from a point adjacent to one of four points, if and only if highly reduced. In the above example, one can slide the slide is 24-17-16-1. Of course 25-24-23-...- 3-2-1 longer. In fact, this is the longest.
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更长。事实上,这是最长的一条。
-
Skiing in order to gain speed, the area must slope downward slide. Michael wants to know the end of the longest in a landslide area. Region is given by a two-dimensional array. Each number represents an array of point level. Here is an example
12345
161,718,196
152,425,207
142,322,218
131,211,109
A person can slide up and down from a point adjacent to one of four points, if and only if highly reduced. In the above example, one can slide the slide is 24-17-16-1. Of course 25-24-23-...- 3-2-1 longer. In fact, this is the longest.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
滑雪问题.cpp