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 location Fatmouse has hid between 0 and 100 blocks of che…
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 location Fatmouse has hid between 0 and 100 blocks of che…
转载请注明出处:http://blog.csdn.net/u012860063 题目链接:pid=1078" target="_blank">http://acm.hdu.edu.cn/showproblem.php?pid=1078 Problem Description FatMouse has stored some cheese in a city. The city can be considered as a square grid of dimension…
题目链接:点击链接 题目大意:老鼠从(0,0)出发,每次在同一个方向上最多前进k步,且每次到达的位置上的数字都要比上一个位置上的数字大,求老鼠经过的位置上的数字的和的最大值 #include<stdio.h> #include<string.h> #define max(a,b) a>b?a:b int n; int k;//前进的步数 int map[105][105]; int ans[105][105];//记忆化搜索,保存中间搜索结果 int search(int x…