mirror of
https://github.com/krahets/hello-algo.git
synced 2026-08-25 01:27:13 +00:00
build
This commit is contained in:
@@ -166,7 +166,7 @@ comments: true
|
||||
}
|
||||
|
||||
/* 分数背包:贪心 */
|
||||
double fractionalKnapsack(int[] wgt, int[] val, int cap) {
|
||||
double FractionalKnapsack(int[] wgt, int[] val, int cap) {
|
||||
// 创建物品列表,包含两个属性:重量、价值
|
||||
Item[] items = new Item[wgt.Length];
|
||||
for (int i = 0; i < wgt.Length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user