Knapsack Revisited

Limits: 3s, 512 MB

Given description of n items (weight and value) and a knapsack of capacity weight W, you have to calculate maximum value that you can get from these items without overflowing the weight of the knapsack. You cannot take any partial amount of item.

This is a companion discussion topic for the original entry at