give a dynamic-programming solution to the 0-1 knapsack problem that runs in / time, where n is the number of items and w is the maximum weight of items that the thief can put in his knapsack