替换图片链接
This commit is contained in:
@@ -163,7 +163,7 @@ dp[1] = dp[1 - weight[0]] + value[0] = 15
|
||||
|
||||
一维dp,分别用物品0,物品1,物品2 来遍历背包,最终得到结果如下:
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
本题力扣上没有原题,大家可以去[卡码网第46题](https://kamacoder.com/problempage.php?pid=1046)去练习,题意是一样的,代码如下:
|
||||
|
||||
Reference in New Issue
Block a user