- Time limit: 1.00 s
- Memory limit: 512 MB
For example, if the coins are $\{2,3,5\}$ and the desired sum is $9$, there are $3$ ways:
- $2+2+5$
- $3+3+3$
- $2+2+2+3$
The first input line has two integers $n$ and $x$: the number of coins and the desired sum of money.
The second line has $n$ distinct integers $c_1,c_2,\dots,c_n$: the value of each coin.
Output
Print one integer: the number of ways modulo $10^9+7$.
Constraints
- $1 \le n \le 100$
- $1 \le x \le 10^6$
- $1 \le c_i \le 10^6$
Input:
3 9
2 3 5
Output:
3