Skip to content

Commit a995573

Browse files
committed
Update 04.Knapsack-Problem-04.md
1 parent e11bc80 commit a995573

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Contents/10.Dynamic-Programming/04.Knapsack-Problem/04.Knapsack-Problem-04.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
>
99
> 请问在总重量不超过背包载重上限的情况下,能装入背包的最大价值是多少?
1010
11-
![](https://qcdn.itcharge.cn/images/20230329095653.png)
11+
![混合背包问题](https://qcdn.itcharge.cn/images/20240514111727.png)
1212

1313
#### 思路 1:动态规划
1414

@@ -82,7 +82,7 @@ class Solution:
8282

8383
> **分组背包问题**:有 $n$ 组物品和一个最多能装重量为 $W$ 的背包,第 $i$ 组物品的件数为 $group\underline{\hspace{0.5em}}count[i]$,第 $i$ 组的第 $j$ 个物品重量为 $weight[i][j]$,价值为 $value[i][j]$。每组物品中最多只能选择 $1$ 件物品装入背包。请问在总重量不超过背包载重上限的情况下,能装入背包的最大价值是多少?
8484
85-
![](https://qcdn.itcharge.cn/images/20230329095729.png)
85+
![分组背包问题](https://qcdn.itcharge.cn/images/20240514111745.png)
8686

8787
### 6.1 分组背包问题基本思路
8888

@@ -202,7 +202,7 @@ class Solution:
202202

203203
> **二维费用背包问题**:有 $n$ 件物品和有一个最多能装重量为 $W$、容量为 $V$ 的背包。第 $i$ 件物品的重量为 $weight[i]$,体积为 $volume[i]$,价值为 $value[i]$,每件物品有且只有 $1$ 件。请问在总重量不超过背包载重上限、容量上限的情况下,能装入背包的最大价值是多少?
204204
205-
![](https://qcdn.itcharge.cn/images/20230329095857.png)
205+
![二维费用背包问题](https://qcdn.itcharge.cn/images/20240514111802.png)
206206

207207
### 7.1 二维费用背包问题基本思路
208208

0 commit comments

Comments
 (0)