2021年11月13日
摘要: 一、01背包 有 $n$ 件物品和一个容量为 $W$ 的背包,第 $i$ 件物品的体积为 $w[i]$,价值为 $v[i]$,求解将哪些物品装入背包中使总价值最大。 例:https://www.acwing.com/problem/content/2/ 思路: 当放入一个价值为 $w[i]$ 的物品 阅读全文
posted @ 2021-11-13 12:58 Hamine 阅读(111) 评论(0) 推荐(0) 编辑