#include<iostream>#include<cstdio>#include<cstdlib>#include<ctime>using namespace std;int num=1;int sum=0;int A=1,B=1,C=1; // num=a+b/c ,a,b,c所对应的长度 int abc[11];//储存a,b,c的值 int is[10]={0}; int a=0,b=0,c=0; int power(int x,int y){ i…
Description In mathematics, the four color theorem, or the four color map theorem, states that, given any separation of a plane into contiguous regions, producing a figure called a map, no more than four colors are required to color the regions of th…
http://acm.hdu.edu.cn/showproblem.php?pid=1010 题意很好理解,不是最短路,而是dfs,虽然地图不算大,稍微注意一点的dfs也能险过,但是700+ms和78ms一对比还是让人难受 对dfs的剪枝处理,实际上就是一个逻辑推理 面对整个地图我可以做出以下判断如果 n * m - wall <= t那就一定say NO n * m 是整个地图的大小,wall是地图中墙的个数相减之后就是最多可以走的步数,之所以取到等号是因为在第0秒的时候,已经走了一个地方了(…