![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Dfs
曜雨丶
这个作者很懒,什么都没留下…
展开
-
【深度优先搜索】HDU 2553 N皇后问题
今天的主菜是搜索,想起来初中就听过八皇后问题了啊。。。当年有一个学编程的机会在我眼前我没有去珍惜,到现在我只能默默后悔。。。嘛,其实我也没那么在意啦题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2553皇后的移动方式是直线和斜线不限长移动,毕竟最强兵种。所以每一行必然只有一个皇后,因此我们可以选择以每行为单位来进行DFS(深度优先原创 2015-07-04 18:22:50 · 412 阅读 · 0 评论 -
【树形DP】 POJ 2152 Fire
FireTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 1412 Accepted: 751DescriptionCountry Z has N cities, which are numbered from 1 to N. Cities are conn原创 2016-07-22 09:09:34 · 362 阅读 · 0 评论 -
【树分治】 POJ 1741 Tree
TreeTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 17624 Accepted: 5757DescriptionGive a tree with n vertices,each edge has a length(positive integer l原创 2016-07-22 10:43:57 · 366 阅读 · 0 评论