c++ solution
\nclass Solution {\npublic:\n    long long dp[105][105][105];\n    const int mod=1e9+7;\n    long long power(long long a,long long b){\n        long long res=1;
```\nclass Solution {\npublic:\n    long long dp[105][105][105];\n    const int mod=1e9+7;\n    long long power(long long a,long long b){\n        long long res=1;\n        while(b){\n            if(b&1){\n                res*=a;\n                res%=mod;\n            }\n            a=(a*a)%mod;\n            b/=2;\n        }\n        return res%mod;\n    }\n    long long find(vector<int>&nums,int index,int sum,int len,int k){\n        if(sum==k) return power(2,(int)nums.size()-len);\n        if(index>=nums.size()||sum>k) return 0;\n        if(dp[index][sum][len]!=-1) return dp[index][sum][len]%mod;\n        long long take=find(nums,index+1,sum+nums[index],len+1,k);\n        long long notTake=find(nums,index+1,sum,len,k);\n        return dp[index][sum][len] = (take+notTake)%mod;\n    }\n    int sumOfPower(vector<int>& nums, int k) {\n        memset(dp,-1,sizeof(dp));\n        int n=nums.size();\n        return find(nums,0,0,0,k)%mod;\n    }\n};\n```
['Dynamic Programming', 'Memoization', 'C', 'C++']