So we put one item in the backpack 9 and we've got a value of 9.
所以我们在背包里放一件物品,而它的价值是。
The backpack is now full, right?
背包现在已经满了,对吧?没有空间了?
I'll compute its value. Then I'll empty the backpack out, put another combination of stuff compute its value, try all possible ways of filling up the backpack, and then when I'm done, I'll know which was the best.
直至把它填满,然后计算价值,然后我把包里的东西都导出来,再换一堆东西计算它们的价值,尝试过所有填满包的方案后,我就知道哪一种方案是最好的了。
应用推荐