Introduction - If you have any usage issues, please Google them yourself
Given n kinds of goods, and a backpack. Item i is the weight of wi, the value of vi, knapsack capacity unchanged. Ask how to choose the items into the backpack, making loading backpack maximum total value of goods?
To calculate the value of each pack and the weight ratio, then the result of the ratio according to a certain order of item into a backpack, but not more than the maximum weight of the backpack.