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…
只能横向或竖向走...一次横着竖着最多k步...不能转弯的.... 为毛我的500+ms才跑出来... #include<cstdio> #include<iostream> #include<algorithm> using namespace std; int mp[105][105],n,k; int dp[105][105]; int dx[105][4]={{0,0,0,0},{-1,1,0,0}}; int dy[105][4]={{0,0,0,0},{0,…
转载请注明出处: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…
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…