随笔分类 -  状态空间搜索

摘要:The Morning after Halloween直接BFS会超时,题目中提示过墙壁很多,那么可以将所有的空格提取出来做张图,然后记录每个空格周围的邻居,这样就不用每次都判断能不能走了。优化的话可以使用双向BFS,从每次正向(从开始位置搜索)搜索一次,反向(从目标... 阅读全文
posted @ 2018-12-05 22:27 ACLJW 阅读(237) 评论(0) 推荐(0)
摘要:Fill#includeusing namespace std;const int maxn = 200 + 5;int T, a, b, c, d;struct node{ int v[3], dist; bool operator rhs.dist;... 阅读全文
posted @ 2018-12-03 23:33 ACLJW 阅读(160) 评论(0) 推荐(0)