Problem: find the amount of money a stack of coins can make.

The vector, coins, contains the values of the coins, and the corresponding vector, quantity, contains the number of coins that there are (let's say coins = {1} and quantity = {5}, this means that I have 5 cents).

Although I have solved this problem, I would like to make it more efficient. Could someone give me some advice?

Miscellaneous information: the variable ctq means coinsToQuantity. I solved this by systematically iterating all possible combinations of coins and putting their sum in a set. There has to be a better way to solve this problem, since this is supposed to be a dynamic programming problem and I solved this problem without any knowledge of what it is supposed to be.

```
#include
#include
#include
```