随笔分类 -  动态规划---背包问题

摘要:N元钱换为零钱,有多少不同的换法?币值包括1 2 5分,1 2 5角,1 2 5 10 20 50 100元。 例如:5分钱换为零钱,有以下4种换法: 1、5个1分 2、1个2分3个1分 3、2个2分1个1分 4、1个5分 (由于结果可能会很大,输出Mod 10^9 + 7的结果) 收起 N元钱换为 阅读全文
posted @ 2019-03-22 15:02 wydxry 阅读(343) 评论(0) 推荐(0) 编辑
摘要:题目链接:http://poj.org/problem?id=3624 Description Bessie has gone to the mall's jewelry store and spies a charm bracelet. Of course, she'd like to fill 阅读全文
posted @ 2019-03-22 14:38 wydxry 阅读(296) 评论(0) 推荐(0) 编辑
摘要:Problem Description 急!灾区的食物依然短缺!为了挽救灾区同胞的生命,心系灾区同胞的你准备自己采购一些粮食支援灾区,现在假设你一共有资金n元,而市场有m种大米,每种大米都是袋装产品,其价格不等,并且只能整袋购买。请问:你用有限的资金最多能采购多少公斤粮食呢?后记:人生是一个充满了变 阅读全文
posted @ 2019-03-20 21:34 wydxry 阅读(206) 评论(0) 推荐(0) 编辑
摘要:在N件物品取出若干件放在容量为W的背包里,每件物品的体积为W1,W2……Wn(Wi为整数),与之相对应的价值为P1,P2……Pn(Pi为整数)。求背包能够容纳的最大价值。 收起 在N件物品取出若干件放在容量为W的背包里,每件物品的体积为W1,W2……Wn(Wi为整数),与之相对应的价值为P1,P2… 阅读全文
posted @ 2019-03-20 20:10 wydxry 阅读(350) 评论(0) 推荐(0) 编辑
摘要:Problem Description Many years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies of bones , s 阅读全文
posted @ 2019-03-20 19:36 wydxry 阅读(265) 评论(0) 推荐(0) 编辑
摘要:POJ 3624 Charm Bracelet 题目链接:http://poj.org/problem?id=3624 Description Bessie has gone to the mall's jewelry store and spies a charm bracelet. Of cou 阅读全文
posted @ 2017-08-08 11:24 wydxry 阅读(426) 评论(0) 推荐(0) 编辑
摘要:题目链接:http://poj.org/problem?id=3624 Bessie has gone to the mall's jewelry store and spies a charm bracelet. Of course, she'd like to fill it with the 阅读全文
posted @ 2017-08-07 16:24 wydxry 阅读(232) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://www.51nod.com/onlineJudge/questionCode.html#!problemId=1085 在N件物品取出若干件放在容量为W的背包里,每件物品的体积为W1,W2……Wn(Wi为整数),与之相对应的价值为P1,P2……Pn(Pi为整数)。求背包能够 阅读全文
posted @ 2017-08-07 16:20 wydxry 阅读(355) 评论(0) 推荐(0) 编辑
摘要:题目链接:http://abc044.contest.atcoder.jp/tasks/arc060_a Time limit : 2sec / Memory limit : 256MB Score : 300 points Problem Statement Tak has N cards. On 阅读全文
posted @ 2017-08-05 10:01 wydxry 阅读(598) 评论(0) 推荐(0) 编辑

Live2D