DP 0-1 knapsack problem with output items in knapsack