摘要: 双向广搜如果想要得到最优路径,就得在扩展节点处判断是否有重合,而不是在元素出队时。一般来说双向广搜比单向的更耗空间。 阅读全文
posted @ 2012-11-15 22:06 小仪在努力~ 阅读(160) 评论(0) 推荐(0)
摘要: /*RESCUE*/#include <iostream>#include<cstdio>#include<cstring>#include<queue>#include<set>#include<memory.h>#include<algorithm>using namespace std;#define maxn 220char start[6],end[6];bool vis[10005];struct re{ int str[4]; int num; re(const char *a) { num=0; 阅读全文
posted @ 2012-11-15 22:00 小仪在努力~ 阅读(157) 评论(0) 推荐(0)