![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
暴搜
文章平均质量分 79
s_h_r
这个作者很懒,什么都没留下…
展开
-
POJ 1816 Wild Words 字典树+DFS
题意:给你一些模板串 再给你一些匹配串 问你每个匹配串分别能被那些模板串匹配 思路:由于模板串有100000个 所以一个一个匹配会超时 我们可以用字典树将这些模板串储存下来 查询时就会减少相同前缀的查找次数 然后就是暴搜了 #include #include #include #include using namespace std; #define REP( i, a, b ) f原创 2015-06-20 17:11:54 · 406 阅读 · 0 评论 -
UVA 1533 - Moving Pegs 状态压缩 + bfs
这题需要注意的是 当一个球的相邻位置为空时 不能直接跳过去 之间必须要有球垫着 #include #include #include #include #include using namespace std; #define bug puts("bug") const int link[15][6] = { {-1,-1,-1,-1, 1, 2}, {-1, 0,-1, 2,原创 2015-04-20 23:41:26 · 429 阅读 · 0 评论