#t410. 数字组合
数字组合
Counting Combinations
Background
Special for beginners, ^_^
Problem Description
There are positive integers. Find the number of possible ways to choose some of them whose sum is (where is also a positive integer). For example:
, the numbers are , and .
Then the possible combinations are , , and , three combinations.
Input Format
The first line contains two positive integers and , separated by a space, where is the number of positive integers and is the required sum ().
The next line contains positive integers separated by spaces.
Output Format
The number of different combinations whose sum is .
Sample Input 1
5 5
1 2 3 4 5
Sample Output 1
3
Constraints
1s, 1024KiB for each test case.