题目:EOJ1981 || POJ1011 经典dfs+剪枝+奇怪的数据
Description
George took sticks of the same length and cut them randomly until all partsbecame at most 50 units long. Now he wants to return sticks to th...
分类:
其他好文 时间:
2014-12-18 20:44:15
阅读次数:
242
Sticks
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 122771
Accepted: 28441
Description
George took sticks of the same length and cut them randomly unt...
分类:
其他好文 时间:
2014-12-02 00:11:43
阅读次数:
172
Square
Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 8589 Accepted Submission(s): 2784
Problem Description
Given a set of sti...
分类:
其他好文 时间:
2014-08-02 18:29:23
阅读次数:
286
poj1010——邮票问题
DFS
poj1011——Sticks dfs + 剪枝
poj1020——拼蛋糕
poj1054——The Troublesome Frog
poj1062——昂贵的聘礼
poj1077——Eight
poj1084——Square Destroyer
poj1085——Triangle War(博弈,極大極小搜索+alpha_beta剪枝)
po...
分类:
其他好文 时间:
2014-07-29 18:07:12
阅读次数:
294
题目大意:乔治有一些碎木棒,是通过将一些相等长度的原始木棒折断得到的,给出碎木棒的总数和各自的长度,求最小的可能的原始木棒的长度;(就是将一些正整数分组,每组加起来和相等,使和尽可能小)一开始做poj 32ms过,但uva3000 ms 都超时。。。而且poj discuss里给出了一组bT数据,最...
分类:
其他好文 时间:
2014-07-29 12:11:26
阅读次数:
173
题意:给m根木棍,将它们重新拼成n根一样长的木棍,并使得n尽量大(即每个新木棍尽量短)。
解法:经典的搜索题目。从小到大枚举拼成的新木棍长度,每次枚举进行一次深搜。这题关键是如何剪枝。
1、当枚举的长度不能整除总长度的时候,剪枝;(这个很显然)
2、先将木棍从长到短排序,枚举时先尝试长的木棍。(先枚举长的可以使得搜索深度不至于过深)
...
分类:
其他好文 时间:
2014-05-06 21:16:11
阅读次数:
329