// Description
There are N items, each with a weight and a value. Choose a subset whose total weight does not exceed W so that the total value is maximized.
// Input
The first line contains two integers N and W (1 <= N <= 1000, 1 <= W <= 1000). Each of the next N lines contains two integers w_i and v_i (1 <= w_i, v_i <= 1000).
// Output
A single integer: the maximum total value.
// Hint
Classic O(N*W) dynamic programming over a 1-D table.