Given an array of $n$ integers $A$, and some value $m$, determine if it is possible, by using certain amounts of each element, to get a total sum equal to $m$. Consider that you can use any amount of any of the elements.
This is sort of like the subset sum problem, but in this case that sum can contain elements multiplied by some factor, and this factor has no upper-bound. I'm struggling quite a bit with this problem, so does anyone know how can I solve it?