#T214. 数字组合

数字组合

Description

Given n positive integers, find the number of possible combinations that sum up to t (where t is also a positive integer).
For example: n=5, the numbers are 1, 2, 3, 4, 5, and t=5.
The possible combinations are:
5 = 1 + 4
5 = 2 + 3
5 = 5
Total of 3 combinations.

Input Format

The first line of input contains two positive integers n and t, separated by a space, where 1 ≤ n ≤ 20 represents the number of positive integers, and t is the target sum (1 ≤ t ≤ 1000).
The next line contains n positive integers, separated by spaces.

Output Format

The number of distinct combinations that sum up to t.

5 5
1 2 3 4 5

3