it works for knapsack - brute force