
♡♡♡搜索
文章平均质量分 81
chaoyueziji123
这个作者很懒,什么都没留下…
展开
-
深搜笔记
文章主要是对于那些刚刚入门的搜索准备的,主要是深度优先搜索。一些对深搜稍稍有一些自己的看法原创 2014-07-09 14:45:27 · 1116 阅读 · 2 评论 -
HDU 1016Prime Ring Problem
A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent circles should be a prime.Note: the number o原创 2014-07-07 10:02:08 · 756 阅读 · 0 评论 -
Avoid The Lakes POJ
Avoid The LakesTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 6409 Accepted: 3466DescriptionFarmer John's farm was flooded in the most recent storm, a原创 2015-01-20 18:12:16 · 1040 阅读 · 0 评论 -
poj 1011 :Sticks (dfs+剪枝)
题意:给出n根小棒的长度stick[i],已知这n根小棒原本由若干根长度相同的长木棒(原棒)分解而来。求出原棒的最小可能长度。 思路:dfs+剪枝。蛮经典的题目,重点在于dfs剪枝的设计。先说先具体的实现:求出总长度sum和小棒最长的长度max,则原棒可能的长度必在max~sum之间,然后从小到大枚举max~sum之间能被sum整除的长度len,用dfs求出所有的小棒能否拼凑成这个转载 2015-01-22 15:48:54 · 728 阅读 · 0 评论 -
Knight Moves
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 square原创 2015-01-22 19:30:14 · 872 阅读 · 0 评论 -
BNU4071:地图填色(DFS)
我们知道,一张地图使用不同的颜色标注相邻的省份的(废话……不然就乱了……)。但是我们想知道用n种颜色对m个省填色共有多少种方法。 当然,我们会给出这m个省得相邻情况。Input第一行为两个整数n m表示颜色与省份数量。(n,mOutput输出一行整数,表示可能的填充方法数。Sample Input4 441 21 42 33转载 2015-03-28 12:20:10 · 923 阅读 · 0 评论 -
dfs Square poj 2362
SquareTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 20988 Accepted: 7314DescriptionGiven a set of sticks of various lengths, is it possible to join th转载 2015-04-02 19:37:12 · 549 阅读 · 0 评论 -
Sum It Up hdu1258
Sum It UpTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4570 Accepted Submission(s): 2353Problem DescriptionGiven a specif转载 2015-04-02 20:42:12 · 559 阅读 · 0 评论 -
翻纸牌游戏 hdu2209
翻纸牌游戏Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2624 Accepted Submission(s): 945Problem Description有一种纸牌游戏,很有意思,给你N张纸牌,一转载 2015-04-04 11:47:12 · 656 阅读 · 0 评论