solve knapsack all part