UVa 147 - Dollars

Summary
Count the number of ways we can form a certain amount.

Explanation
This is a standard Dynamic Programming - Subset Sum problem.

Gotchas

 * Rounding Errors.
 * Use long long instead of int

Optimizations

 * You can make the array smaller by noting that everything is a multiple of 5 cents.

Input
0.20 2.00 299.95 0.00

Output
0.20               4  2.00              293 299.95  181000196059736

Solutions

 * Code All the Problems