#t409. 货币系统

货币系统

Currency System

Problem Description

You are given a currency system with nn denominations. Compute the number of ways to make up an amount of face value mm using these denominations.

Input Format

The first line contains two integers nn and mm (1≤n≤20, 1≤m≤4000)(1\le n\le 20,\ 1\le m\le 4000).

The following nn lines each contain one integer, the face value of one denomination.

Output Format

Output a single integer: the number of ways to compose currency of face value mm.

Sample Input

3 10
1
2
5

Sample Output

10

Constraints

1≤n≤201\le n\le 20, 1≤m≤40001\le m\le 4000. Time limit 1s, memory limit 1024KiB for each test case.