Introduction - If you have any usage issues, please Google them yourself
N pieces of a given item, the weight they were w [0], w [1], ... ... w [n-1], the value of goods, respectively v [0], v [1], ... ... v [n-1], while a backpack, which can accommodate a total weight w. Design an item selecting program, requested items from n items selected in the total weight does not exceed the capacity of backpack w, to select the items and the maximum value.