
动态规划-背包
文章平均质量分 86
STILLxjy
不要让任何人打乱你生活的节奏
展开
-
(POJ1837)Balance <01背包变形经典题>
Balance DescriptionGigel has a strange “balance” and he wants to poise it. Actually, the device is different from any other ordinary balance. It orders two arms of negligible weight and each arm’s l原创 2016-11-23 14:04:38 · 821 阅读 · 0 评论 -
(POJ1376)Cash Machine <多重背包问题变形,二进制优化>
Cash Machine DescriptionA Bank plans to install a machine for cash withdrawal. The machine is able to deliver appropriate @ bills for a requested cash amount. The machine uses exactly N distinct bill原创 2016-11-25 14:49:25 · 592 阅读 · 0 评论 -
(CCF 201312-4)有趣的数 [DP] 最详细解答
问题描述 我们把一个数称为有趣的,当且仅当: 1. 它的数字只包含0, 1, 2, 3,且这四个数字都出现过至少一次。 2. 所有的0都出现在所有的1之前,而所有的2都出现在所有的3之前。 3. 最高位数字不为0。 因此,符合我们定义的最小的有趣的数是2013。除此以外,4位的有趣的数还有两个:2031和2301。 请计算恰好有n位的有趣的数的个数。由于答案可能非原创 2017-10-21 15:17:40 · 438 阅读 · 0 评论