相关疑难解决方法(0)

最大化消耗能源

提供了三种类型的食物,即肉,蛋糕和比萨饼,在N个不同的商店出售食物,我只能从每个商店中选择一种食物。另外,我只能以A,B和C编号购买商品,其中“ A”表示从不同商店的“ A”总数中购买肉类(请参见示例)。我的任务是消耗食物,以使我拥有最大的能量。例,

10            <= number of stores <br>
5 3 2         <= out of 10 stores I can pick meat from 5 stores only. Similarly,
                 I can pick cake from 3 out of 10 stores...
56 44 41    1 <= Energy level of meat, cake and pizza - (56, 44, 41) for first store.<br> 
56 84 45    2
40 98 49    3
91 59 73    4
69 94 42    5
81 64 80    6
55 …
Run Code Online (Sandbox Code Playgroud)

python algorithm dynamic-programming

10
推荐指数
1
解决办法
277
查看次数

标签 统计

algorithm ×1

dynamic-programming ×1

python ×1