uva562: Dividing Coins. DP + Knapsack + Subset_problem