
DFS
文章平均质量分 70
DFS
Marx_W
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
HDU——1372 Knight Move(dfs)
Problem DescriptionA friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves that visits each square of a given set of n ...原创 2018-04-30 19:01:49 · 261 阅读 · 0 评论 -
HDU——2553 N皇后问题(dfs打表)
Problem Description在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。 你的任务是,对于给定的N,求出有多少种合法的放置方法。Input共有若干行,每行一个正整数N≤10,表示棋盘和皇后的数量;如果N=0,表示结束。Output共有若干行,每行一个正整数,表示对应输入...原创 2018-04-03 20:37:05 · 220 阅读 · 0 评论 -
HDU——1584 蜘蛛牌(剪枝 + dfs)
Problem Description蜘蛛牌是windows xp操作系统自带的一款纸牌游戏,游戏规则是这样的:只能将牌拖到比她大一的牌上面(A最小,K最大),如果拖动的牌上有按顺序排好的牌时,那么这些牌也跟着一起移动,游戏的目的是将所有的牌按同一花色从小到大排好,为了简单起见,我们的游戏只有同一花色的10张牌,从A到10,且随机的在一行上展开,编号从1到10,把第i号上的牌移到第j号牌上,移...原创 2018-04-03 20:32:54 · 264 阅读 · 0 评论 -
HDU——1241 Oil deposits(dfs)
Problem DescriptionThe GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates a...原创 2018-03-31 16:26:14 · 245 阅读 · 0 评论 -
HDU——1142 A walking through the forest(Dijkstra + DFS)
Problem DescriptionJimmy experiences a lot of stress at work these days, especially since his accident made working difficult. To relax after a hard day, he likes to walk home. To make things even n...原创 2018-03-22 20:19:37 · 291 阅读 · 0 评论