{"trustable":false,"sections":[{"title":"","value":{"format":"MD","content":"Michael likes snowboarding. That\u0027s not very surprising, since snowboarding is really great. The bad thing is that in order to gain speed, the area must slide downwards. Another disadvantage is that when you\u0027ve reached the bottom of the hill you have to walk up again or wait for the ski-lift.\n\nMichael would like to know how long the longest run in an area is. That area is given by a grid of numbers, defining the heights at those points. Look at this example:\n\n1 2 3 4 5\n16 17 18 19 6\n15 24 25 20 7\n14 23 22 21 8\n13 12 11 10 9\n\nOne can slide down from one point to a connected other one if and only if the height decreases. One point is connected to another if it\u0027s at left, at right, above or below it. In the sample map, a possible slide would be 24-17-16-1 (start at 24, end at 1). Of course if you would go 25-24-23-. . . -3-2-1, it would be a much longer run. In fact, it\u0027s the longest possible.\n\nInput\n\nThe first line contains the number of test cases N. Each test case starts with a line containing the name (it\u0027s a single string), the number of rows R and the number of columns C. After that follow R lines with C numbers each, defining the heights. R and C won\u0027t be bigger than 100,N not bigger than 15 and the heights are always in the range from 0 to 100.\n\nOutput\n\nFor each test case, print a line containing the name of the area, a colon, a space and the length of the longest run one can slide down in that area.\n\nSample Input\n2\nFeldberg 10 5\n56 14 51 58 88\n26 94 24 39 41\n24 16 8 51 51\n76 72 77 43 10\n38 50 59 84 81\n5 23 37 71 77\n96 10 93 53 82\n94 15 96 69 9\n74 0 62 38 96\n37 54 55 82 38\nSpiral 5 5\n1 2 3 4 5\n16 17 18 19 6\n15 24 25 20 7\n14 23 22 21 8\n13 12 11 10 9\n\nSample Output\nFeldberg: 7\nSpiral: 25\n"}},{"title":"","value":{"format":"MD","content":"迈克尔喜欢滑雪板。这并不十分令人惊讶,因为单板滑雪真的很棒。不好的地方是,为了获得速度,必须往下滑。另一个缺点是,当你到达山底时,你必须再次走上去或等待滑雪缆车。\n\n迈克尔想知道一个地区最长的跑道是多长。这个区域是由一个数字网格给出的,确定了这些点的高度。请看这个例子。\n\n1 2 3 4 5\n16 17 18 19 6\n15 24 25 20 7\n14 23 22 21 8\n13 12 11 10 9\n\n当且仅当高度减少时,人们可以从一个点滑落到另一个相连的点。如果一个点在左边,在右边,在它的上面或下面,那么它就与另一个点相连。在样本地图中,一个可能的滑动是24-17-16-1(从24开始,在1结束)。当然,如果你会走25-24-23-. . -3-2-1,这将是一个更长的运行。事实上,这是最长的可能。\n\n输入\n\n第一行包含测试用例的数量N。每个测试用例以包含名称(是一个单一的字符串)、行数R和列数C的一行开始,之后是R行,每行有C个数字,定义了高度。R和C不会大于100,N不会大于15,高度总是在0到100的范围内。\n\n输出\n\n对于每个测试案例,打印一行,包含该区域的名称、冒号、空格和在该区域可以滑下的最长长度。\n\n输入样本\n2\nFeldberg 10 5\n56 14 51 58 88\n26 94 24 39 41\n24 16 8 51 51\n76 72 77 43 10\n38 50 59 84 81\n5 23 37 71 77\n96 10 93 53 82\n94 15 96 69 9\n74 0 62 38 96\n37 54 55 82 38\nSpiral 5 5\n1 2 3 4 5\n16 17 18 19 6\n15 24 25 20 7\n14 23 22 21 8\n13 12 11 10 9\n\n输出样本\nFeldberg: 7\nSpiral: 25\n"}}]}