So we put one item in the backpack 9 and we've got a value of 9.
所以我们在背包里放一件物品,而它的价值是。
Item 0, oh, you're right, items is 9. Thank you.
号物品,哦,你说对了,物品的价值是9,谢谢。
And item 1 has a value of 7.
号物品的价值是。
And so the value of with i will be the value of i plus whatever I can get using the remaining items and decrementing the weight by the weight of i.
所以装上i之后的总价值,就是i的价值加上剩下物品中,符合条件者的所有价值,再在剩余重量中减去i的重量。
应用推荐