We are given a set of $n$ coins with denominations $v_1,v_2,\ldots,v_n$ and a number $x$.
The coins are to be divided between to persons, with the restriction that each person's coins must add up to at least $x$.
For example, if $x=1$, $n=2$, and $v_1=v_2=2$, then there are two possible distributions: one where Person 1 gets coin #1 and Person 2 gets coin #2, and one with the reverse. (These distributions are considered distinct even though both coins have the same denomination.)
I'm interested in counting the possible distributions. I'm pretty sure this can be done in $O(nx)$ time and $O(n+x)$ space using dynamic programming; but I don't see how.