随笔分类 -  搜索

摘要:https://cn.vjudge.net/problem/LightOJ-1121 1 #include<cstdio> 2 #include<algorithm> 3 #include<cstring> 4 #include<vector> 5 using namespace std; 6 #d 阅读全文
posted @ 2019-02-22 20:44 hehe_54321 阅读(334) 评论(0) 推荐(0)
摘要:https://www.lydsy.com/JudgeOnline/problem.php?id=5449 话说很早以前做过。。算是IDA*的板子吧,一个简单的估价函数就可以过去了 1 %:pragma GCC optimize(2) 2 #include<cstdio> 3 #include<al 阅读全文
posted @ 2018-10-23 21:31 hehe_54321 阅读(338) 评论(0) 推荐(0)
摘要:Eight POJ - 1077 HDU - 1043 八数码问题。用hash(康托展开)判重 bfs(TLE) 从目标状态出发,一次bfs打出所有输入对应结果的表(172ms) 以下的IDA*和A*都要用逆序数特判无解的情况,因为无解的时候IDA*直接无限制搜,A*遍历所有解空间,效率很低。 所谓 阅读全文
posted @ 2017-11-08 17:05 hehe_54321 阅读(250) 评论(0) 推荐(0)

AmazingCounters.com