摘要: dfs+奇偶剪枝,关键在于奇偶剪枝的应用#include <iostream> #include <stdio.h> using namespace std; char s[10][10]; int vis[10][10]; int d[4][2]={{0,1},{0,-1},{1,0},{-1,0}}; int fx,fy; int n,m,t; int flag; void dfs(int sx,int sy,int step) { int i; if((t-step)%2!=(sx+sy+fx+fy)%2) return;//奇偶性剪枝 if(step==t) . 阅读全文
posted @ 2013-02-26 20:22 LJ_COME!!!!! 阅读(126) 评论(0) 推荐(0)