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
Added by: | Ha Minh Ngoc |
Date: | 2019-04-23 |
Time limit: | 1s-1.5s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: GOSU |