![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
搜索
文章平均质量分 50
MozzieZ
这个作者很懒,什么都没留下…
展开
-
50道hdu基础搜索总结
Dfs: 大部分是直接递归枚举,即求满足约束条件下的解,虽不用剪枝,但也需要代码能力。 练习递归枚举的题目: 1241 Oil Deposits (dfs的连通块个数) 1016 Prime Ring Problem 1584 蜘蛛牌(简单dfs,简单的剪枝,还有人用DP做(???)) 1426 Sudoku Ki转载 2016-04-17 15:58:00 · 226 阅读 · 0 评论 -
hdu1241(dfs连通块)
#include #include #include #include using namespace std; char ma[105][105]; int n,m,ct; void dfs(int x,int y){ ma[x][y]='*'; for(int dx = -1; dx for(int dy = -1; d原创 2016-04-17 16:29:43 · 153 阅读 · 0 评论