The Knapsack Problem can be described as follows: We nave an empty bag with (weight) capacity C, along with n items. The items have weights w(i) and values v(i), for i=1,2,...,n. There is only one of each item. Which items should we take to maximize the total value, while not exceeding the bag capacity?

To start, enter the number of items.