This commit is contained in:
youngyangyang04
2020-11-26 10:07:01 +08:00
parent cca55c4417
commit 5a5e0a1944
2 changed files with 18 additions and 133 deletions

View File

@ -70,7 +70,10 @@ public:
## 动态规划
使用背包要明确dp[i]表示的是什么i表示的又是什么
使用背包要明确dp[i]表示的是什么i表示的又是什么
填满i包括i这么大容积的包有dp[i]种方法。
```
// 时间复杂度O(n^2)
@ -94,6 +97,15 @@ public:
}
};
```
dp数组中的数值变化从[0 - 4]
```
1 1 0 0 0
1 2 1 0 0
1 3 3 1 0
1 4 6 4 1
1 5 10 10 5
```
# 总结