As soon as the available size goes to 0, I know I can't enter any more items into the memo, right?
一旦可装大小为0时我就知道,我不能再在memo中添加物品了?
I'm one of those people. I can do detailed items, very small.
我是那种可以做些具体的、琐碎的事情的人。
So how long it takes to run is related to how many items I end up being able to fit into the knapsack.
所以,运行的时间是和我能够,装进背包的物品数目有关的。
Every time I drive the steering wheel of my car, I rub off some items. But that's OK, it's still the very same physical object.
每次我使用方向盘时,都会摩擦掉一些微粒,但没关系,它还是原来那个物体。
I'm basically against must-have items. That's my...
基本上我是反对必备款的。这是我的……
So there's the vector eight. Indicating I didn't take any of the items.
有8个0的向量,意思就是我一样东西都没拿。
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的重量。
应用推荐