文件名称:1
介绍说明--下载内容均来自于网络,请自行研究使用
利用贪心策略解决背包问题。现有载重为M公斤的背包和n种货物。第i种货物的重量为Wi,它的总价值为Pi,假定M、Wi、Pi均为整数。设计程序给出装货方法,使装入背包的货物总价值达到最大。-Greedy strategy to solve the knapsack problem using. Current load of M kg backpack and n kinds of goods. First i kind of cargo weight Wi, its total value of Pi, assuming M, Wi, Pi are integers. Given method of loading the design process, so that the total value of goods into the bag maximum.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
1.cpp