Tap here to switch tabs
Problem
Submissions

Problem: Find the Sum of the Power of All Subsequences

Try to solve the Find the Sum of the Power of All Subsequences problem.

Statement

You are given an integer array nums of length n and a positive integer k.

The power of an array is defined as the number of its subsequences whose elements sum up to k.

Return the sum of the power of all subsequences of nums. Since the answer may be very large, return it modulo 109+710^9 + 7.

Constraints:

  • 1≤1 \leq n ≤100\leq 100

  • 1≤1 \leq nums[i] ≤104\leq 10^4

  • 1≤1 \leq k ≤100\leq 100

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Find the Sum of the Power of All Subsequences

Try to solve the Find the Sum of the Power of All Subsequences problem.

Statement

You are given an integer array nums of length n and a positive integer k.

The power of an array is defined as the number of its subsequences whose elements sum up to k.

Return the sum of the power of all subsequences of nums. Since the answer may be very large, return it modulo 109+710^9 + 7.

Constraints:

  • 1≤1 \leq n ≤100\leq 100

  • 1≤1 \leq nums[i] ≤104\leq 10^4

  • 1≤1 \leq k ≤100\leq 100