3082. Find the Sum of the Power of All Subsequences
- User Accepted:924
- User Tried:1995
- Total Accepted:987
- Total Submissions:4186
- Difficulty:**Hard**
You are given an integer array
nums
of lengthn
and a positive integerk
.The power of an array of integers is defined as the number of subsequences with their sum equal to
k
.Return the sum of power of all subsequences of
nums
.Since the answer may be very large, return it modulo
109 + 7
.
c++
1 |
|