Back to General discussions forum
This is a problem about using combinations of coins to arrive at different totals; in particular to determine whether or not a given total is achievable.
Yep, it amazes that the problem statement looks pretty straightforward and meanwhile it never came into my mind! Perhaps because of the related but much simpler problem which allows negative amounts of coins (i.e. change from cashier). I eventually scrapped a bruteforce solution after two attempts at ideas which were obviously wrong. I think this bruteforce could be significantly improved, but it is yet to be seen whether i can code it :) And in morning I have thought "hah, that shouldn't be difficult task!"