This commit is contained in:
krahets
2023-11-27 02:32:06 +08:00
parent 32d5bd97aa
commit a4a23e2488
31 changed files with 179 additions and 213 deletions

View File

@ -155,14 +155,9 @@ comments: true
```csharp title="fractional_knapsack.cs"
/* 物品 */
class Item {
public int w; // 物品重量
public int v; // 物品价值
public Item(int w, int v) {
this.w = w;
this.v = v;
}
class Item(int w, int v) {
public int w = w; // 物品重量
public int v = v; // 物品价值
}
/* 分数背包:贪心 */