摘要: 这是一个双向搜索题,我用BFS把所有的点都搜索到;再进行两次搜索的比较;#include<cstdio>#include<cstring>#include<iostream>using namespace std;class Node{public: int x , y ; int step; int num; };Node queue[80024];int step[2][204][204],N,M;int d[4][2] = { 0,1,1,0,-1,0,0,-1 };char map[204][204];int BFS( int x1,int y1, 阅读全文
posted @ 2012-03-02 14:51 wutaoKeen 阅读(181) 评论(0) 推荐(0) 编辑