6.18. Consider the following variation on the change-making problem (Exercise 6.17): you are given
denominations $x_1, x_2, \dots, x_n$, and you want to make change for a value $v$, but you are allowed to
use each denomination at most once. For instance, if the denominations are 1, 5, 10, 20, then you
can make change for $16 = 1 + 15$ and for $31 = 1 + 10 + 20$ but not for 40 (because you can't use 20
twice).
Input: Positive integers $x_1, x_2, \dots, x_n$; another integer $v$.
Output: Can you make change for $v$, using each denomination $x_i$ at most once?
Show how to solve this problem in time $O(nv)$.