// Description
Given coin denominations and a target amount, output the minimum number of coins needed to make the amount, or -1 if it is impossible. Each coin may be used any number of times.
// Input
The first line contains the amount A and the number of coin types C (0 <= A <= 10^4, 1 <= C <= 20). The second line contains C coin values.
// Output
The minimum number of coins, or -1 if the amount cannot be formed.
// Hint
Unbounded-knapsack style DP over the amount.