随笔分类 -  DFS

摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1241 Oil DepositsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Subm... 阅读全文
posted @ 2015-04-02 21:46 疯狂的癫子 阅读(152) 评论(0) 推荐(0)
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1258Sum It UpTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submissio... 阅读全文
posted @ 2015-04-01 21:23 疯狂的癫子 阅读(255) 评论(0) 推荐(0)
摘要:历届试题 剪格子 时间限制:1.0s 内存限制:256.0MB问题描述如下图所示,3 x 3 的格子中填写了一些整数。+--*--+--+|10* 1|52|+--****--+|20|30* 1|*******--+| 1| 2| 3|+--+--+--+我们沿着图中的星号线剪开,得到两个部分... 阅读全文
posted @ 2015-03-30 21:36 疯狂的癫子 阅读(119) 评论(0) 推荐(0)
摘要:历届试题 大臣的旅费 时间限制:1.0s 内存限制:256.0MB问题描述很久以前,T王国空前繁荣。为了更好地管理国家,王国修建了大量的快速路,用于连接首都和王国内的各大城市。为节省经费,T国的大臣们经过思考,制定了一套优秀的修建方案,使得任何一个大城市都能从首都直接或者通过其他大城市间接到达。... 阅读全文
posted @ 2015-03-29 16:21 疯狂的癫子 阅读(332) 评论(0) 推荐(0)
摘要:dfs,求出1-9的全排列。把1-9的排列划分为num1,num2,num3,看是否满足n==num1+num2/num3。历届试题 带分数 时间限制:1.0s 内存限制:256.0MB问题描述100 可以表示为带分数的形式:100 = 3 + 69258 / 714。还可以表示为:100 = 8... 阅读全文
posted @ 2015-03-24 16:56 疯狂的癫子 阅读(238) 评论(0) 推荐(0)
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1045 Fire NetTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submissio... 阅读全文
posted @ 2014-12-13 16:37 疯狂的癫子 阅读(161) 评论(0) 推荐(0)
摘要:http://poj.org/problem?id=2255已知先序和中序遍历,求后序遍历二叉树。 小白书1,106页。 Tree RecoveryTime Limit:1000MSMemory Limit:65536KTotal Submissions:11774Accepted:7382Des... 阅读全文
posted @ 2014-12-04 20:33 疯狂的癫子 阅读(199) 评论(0) 推荐(0)
摘要:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4744Escape Time IITime Limit: 2 Seconds Memory Limit: 65536 KBThere is a fire in LTR ’ s h... 阅读全文
posted @ 2014-08-30 11:03 疯狂的癫子 阅读(135) 评论(0) 推荐(0)
摘要:MachineTime Limit: 2 Seconds Memory Limit: 65536 KBIn a typical assembly line, machines are connected one by one. The first machine's output product ... 阅读全文
posted @ 2014-08-26 16:25 疯狂的癫子 阅读(239) 评论(0) 推荐(0)
摘要:Help Me EscapeTime Limit: 2 Seconds Memory Limit: 32768 KBBackgroundIf thou doest well, shalt thou not be accepted? and if thou doest not well, sin l... 阅读全文
posted @ 2014-08-26 16:22 疯狂的癫子 阅读(228) 评论(0) 推荐(0)
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1501ZipperTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 5810Accepted Submission(s): 2088 Problem DescriptionGiven three strings, you are to determine whether the third string can be formed by combining t 阅读全文
posted @ 2013-12-16 21:52 疯狂的癫子 阅读(247) 评论(0) 推荐(0)
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1035 Robot MotionTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5591Accepted Submission(s): 2604Problem DescriptionA robot has been programmed to follow the instructions in its path. Instructions for the n 阅读全文
posted @ 2013-12-11 19:30 疯狂的癫子 阅读(207) 评论(0) 推荐(0)
摘要:排列2Time Limit : 1000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 15Accepted Submission(s) : 12Font:Times New Roman|Verdana|GeorgiaFont Size:←→Problem DescriptionRay又对数字的列产生了兴趣: 现有四张卡片,用这四张卡片能排列出很多不同的4位数,要求按从小到大的顺序输出这些4位数。Input每组数据占一行,代表四张卡片上的数字(0 2 #include 3 in. 阅读全文
posted @ 2013-08-24 02:31 疯狂的癫子 阅读(264) 评论(0) 推荐(0)
摘要:Oil DepositsTime Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 15Accepted Submission(s) : 14Font:Times New Roman|Verdana|GeorgiaFont Size:←→Problem DescriptionThe GeoSurvComp geologic survey company is responsible for detecting underground oil deposit. 阅读全文
posted @ 2013-08-24 02:25 疯狂的癫子 阅读(189) 评论(0) 推荐(0)
摘要:Counting SheepTime Limit : 2000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 14Accepted Submission(s) : 12Font:Times New Roman|Verdana|GeorgiaFont Size:←→Problem DescriptionA while ago I had trouble sleeping. I used to lie awake, staring at the ceiling, for hours. 阅读全文
posted @ 2013-08-24 02:17 疯狂的癫子 阅读(293) 评论(0) 推荐(0)
摘要:SquareTime Limit : 10000/5000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 20Accepted Submission(s) : 12Font:Times New Roman|Verdana|GeorgiaFont Size:←→Problem DescriptionGiven a set of sticks of various lengths, is it possible to join them end-to-end to form a square. 阅读全文
posted @ 2013-08-24 02:07 疯狂的癫子 阅读(168) 评论(0) 推荐(0)
摘要:可以多看看。 蜘蛛牌Time Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1206Accepted Submission(s): 476 Problem Description蜘蛛牌是windows xp操作系统自带的一款纸牌游戏,游戏规则是这样的:只能将牌拖到比她大一的牌上面(A最小,K最大),如果拖动的牌上有按顺序排好的牌时,那么这些牌也跟着一起移动,游戏的目的是将所有的牌按同一花色从小到大排好,为了简单起见,我们的游戏只有同一花色的10张牌 阅读全文
posted @ 2013-08-16 16:16 疯狂的癫子 阅读(471) 评论(3) 推荐(0)