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

摘要:B . A prince of the Science Continent was imprisoned in a castle because of his contempt for mathematics when he was young, and was entangled in some 阅读全文
posted @ 2018-09-15 22:03 楼主好菜啊 阅读(386) 评论(0) 推荐(0) 编辑
摘要:Partychen like to do mathematical problems. One day, when he was doing on a least common multiple(LCM) problem, he suddenly thought of a very interest 阅读全文
posted @ 2018-06-06 20:45 楼主好菜啊 阅读(186) 评论(0) 推荐(0) 编辑
摘要:Diablo III is an action role-playing video game. A few days ago, Reaper of Souls (ROS), the new expansion of Diablo III, has been released! On hearing 阅读全文
posted @ 2018-06-04 23:48 楼主好菜啊 阅读(267) 评论(0) 推荐(0) 编辑
摘要:Description In a shop each kind of product has a price. For example, the price of a flower is 2 ICU (Informatics Currency Units) and the price of a va 阅读全文
posted @ 2018-06-04 14:03 楼主好菜啊 阅读(361) 评论(0) 推荐(0) 编辑
摘要:Problem 1538 - B - Stones II Time Limit: 1000MS Memory Limit: 65536KB Total Submit: 428 Accepted: 64 Special Judge: No Description Xiaoming took the f 阅读全文
posted @ 2018-06-02 15:20 楼主好菜啊 阅读(161) 评论(0) 推荐(0) 编辑
摘要:题意: 给你 n 张卡片,总共可以消耗的法力值,求最多可以造成多少伤害, 卡片分为2种,一种是魔法卡,使用后可以使所有的连环卡的费用全部减1,另一种是连环卡,因魔法卡的使用可以使其费用减1,问最终最多可以造成多少的伤害 思路分析 : 比赛的时候大脑短路了,基本不愿意去想东西了,导致题目没有出来,这个 阅读全文
posted @ 2018-06-01 12:33 楼主好菜啊 阅读(246) 评论(0) 推荐(0) 编辑
摘要:Ivan is a student at Berland State University (BSU). There are n days in Berland week, and each of these days Ivan might have some classes at the univ 阅读全文
posted @ 2018-03-07 17:49 楼主好菜啊 阅读(341) 评论(0) 推荐(0) 编辑
摘要:有N件物品,告诉你这N件物品的重量以及价值,将这些物品划分为K组,每组中的物品互相冲突,最多选一件,求解将哪些物品装入背包可使这些物品的费用综合不超过背包的容量,且价值总和最大。 其实,对于每一组的物品,都可以看成是一个01背包问题,因此我只需要对每组的物品都处理一遍即可。 例题: 一个旅行者有一个 阅读全文
posted @ 2018-03-07 13:10 楼主好菜啊 阅读(2582) 评论(0) 推荐(2) 编辑
摘要:理解了这道题 , 我感觉对背包又有了一个更深的认识 …… HDU 2159 最近xhd正在玩一款叫做FATE的游戏,为了得到极品装备,xhd在不停的杀怪做任务。久而久之xhd开始对杀怪产生的厌恶感,但又不得不通过杀怪来升完这最后一级。现在的问题是,xhd升掉最后一级还需n的经验值,xhd还留有m的忍 阅读全文
posted @ 2017-08-16 10:33 楼主好菜啊 阅读(195) 评论(0) 推荐(0) 编辑
摘要:(推荐 : http://blog.csdn.net/insistgogo/article/details/11176693 ) 学会了前两个背包 , 学这个背包还是很轻松的 。 多重背包 , 顾名思义 , 就是前两种背包结合到一起 , 首先还是用一个例子说明 。 1、问题描述 已知:有一个容量为V 阅读全文
posted @ 2017-08-15 16:25 楼主好菜啊 阅读(291) 评论(0) 推荐(0) 编辑
摘要:( 推荐 : http://blog.csdn.net/insistgogo/article/details/11081025 ) 问题描述 : 已知一个容量为 V 的背包 和 N 件物品 , 第 i 件物品的价值是 value[ i ] 体重为 weight[ i ] 。 条件 : 每件物品有无限 阅读全文
posted @ 2017-08-14 22:23 楼主好菜啊 阅读(299) 评论(0) 推荐(0) 编辑
摘要:nyoj 325 http://acm.nyist.net/JudgeOnline/problem.php?pid=325 zb的生日 时间限制:3000 ms | 内存限制:65535 KB 难度:2 Problem Description 现有一笔经费可以报销一定额度的发票。允许报销的发票类型包 阅读全文
posted @ 2017-08-13 09:53 楼主好菜啊 阅读(396) 评论(0) 推荐(0) 编辑
摘要:这个01背包 , 理解了一天才勉强懂点 , 写个博客 ( 推荐 http://blog.csdn.net/insistgogo/article/details/8579597) 题目 : 有N件物品和一个容量为V的背包。第i件物品的费用是c[i],价值是w[i]。求解将哪些物品装入背包可使价值总和最 阅读全文
posted @ 2017-08-11 19:19 楼主好菜啊 阅读(352) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示