
状态空间搜索
ACLJW
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
1601:The Morning after Halloween(经典)
The Morning after Halloween 直接BFS会超时,题目中提示过墙壁很多,那么可以将所有的空格提取出来做张图,然后记录每个空格周围的邻居,这样就不用每次都判断能不能走了。优化的话可以使用双向BFS,从每次正向(从开始位置搜索)搜索一次,反向(从目标位置搜索)搜索一次,如果有相同状态则找到最短路径。 BFS(800ms): #include<bits/stdc++...原创 2018-12-05 22:26:49 · 434 阅读 · 0 评论 -
10603:Fill
Fill #include<bits/stdc++.h> using namespace std; const int maxn = 200 + 5; int T, a, b, c, d; struct node{ int v[3], dist; bool operator < (const node& rhs) const{ retu...原创 2018-12-03 23:32:32 · 207 阅读 · 0 评论