
记忆话搜索
文章平均质量分 76
qq_41555192yl
吾往矣...
展开
-
G - 滑雪
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...原创 2018-08-10 21:37:16 · 138 阅读 · 0 评论 -
L - FatMouse and Cheese
FatMouse has stored some cheese in a city. The city can be considered as a square grid of dimension n: each grid location is labelled (p,q) where 0 <= p < n and 0 <= q < n. At each grid lo...原创 2018-08-10 21:38:34 · 232 阅读 · 0 评论 -
Happy Path
Sample Input 1 1 3 2 1 2 3 2 Sample Output 1 2 解析:其实我们只需要求得每个节点的“儿子”有多少个,然后把它们相加即可,结果是:0+1+2+0+4+3=10; 例如: 以下过程按代码进行模拟: son [ 6 ] = 0; dp[ 6 ] = 0; ...原创 2018-08-31 12:44:31 · 1609 阅读 · 0 评论