We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e2c9a41 + b5f11af commit 793129bCopy full SHA for 793129b
problems/背包问题理论基础完全背包.md
@@ -37,7 +37,7 @@
37
* [动态规划:关于01背包问题,你该了解这些!(滚动数组)](https://programmercarl.com/背包理论基础01背包-2.html)
38
39
首先在回顾一下01背包的核心代码
40
-```
+```cpp
41
for(int i = 0; i < weight.size(); i++) { // 遍历物品
42
for(int j = bagWeight; j >= weight[i]; j--) { // 遍历背包容量
43
dp[j] = max(dp[j], dp[j - weight[i]] + value[i]);
0 commit comments