摘要: A New Year party is not a New Year party without lemonade! As usual, you are expecting a lot of guests, and buying lemonade has already become a pleas 阅读全文
posted @ 2018-03-07 22:09 楼主好菜啊 阅读(176) 评论(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 楼主好菜啊 阅读(340) 评论(0) 推荐(0) 编辑
摘要: 有N件物品,告诉你这N件物品的重量以及价值,将这些物品划分为K组,每组中的物品互相冲突,最多选一件,求解将哪些物品装入背包可使这些物品的费用综合不超过背包的容量,且价值总和最大。 其实,对于每一组的物品,都可以看成是一个01背包问题,因此我只需要对每组的物品都处理一遍即可。 例题: 一个旅行者有一个 阅读全文
posted @ 2018-03-07 13:10 楼主好菜啊 阅读(2576) 评论(0) 推荐(2) 编辑