Submit | All submissions | Best solutions | Back to list |
EISUBSET2 - Subset 2 |
Given an array of n integers, count the number of non-empty subsets whose sum is equal to the given integer k
Input
The first line is 2 integers n, k
The second line is the n integers of the array
The first line is 2 integers n, k
The second line is the n integers of the array
Output
Number of subsets that satisfy the requirement
Example
Input:
4 3
-1 1 1 2
Output:
3