1. 首页
  2. 编程语言
  3. C
  4. 0-1背包问题需对容量为c 的背包进行装载。从n 个物品中选取装入背包的物品,每件物品i 的重量为wi ,价值为pi 。对于可行的背包装载,背包中物品的总重量不

0-1背包问题需对容量为c 的背包进行装载。从n 个物品中选取装入背包的物品,每件物品i 的重量为wi ,价值为pi 。对于可行的背包装载,背包中物品的总重量不

上传者: 2019-06-22 06:13:27上传 CPP文件 1.18KB 热度 57次
The 0-1 backpack problem requires loading a backpack of size c. Select the item loaded into the backpack from n items, each item i has a weight of wi and a value of pi. For a viable backpack load, the total weight of the items in the backpack cannot exceed the capacity of the backpack. The best load means that the loaded item has the highest value.
下载地址
用户评论
码姐姐匿名网友 2019-06-22 06:13:27

挺好用的,谢谢

码姐姐匿名网友 2019-06-22 06:13:27

运行正确,谢谢分享

码姐姐匿名网友 2019-06-22 06:13:27

这个程序经检验完全正确,并且得到了老师的认可

码姐姐匿名网友 2019-06-22 06:13:27

挺好用的 谢谢啊

码姐姐匿名网友 2019-06-22 06:13:27

这个背包代码写的很好,就是在结构体的定义和应用那里有那么一点点不太规范的地方,不过稍作改动就可以了,真的很谢谢你带来这么好的资源