C++ , DP no more no less
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:O(n*k)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:O(n*k)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    int sumOfPower(vector<int>& nums, int k) {\n        const int val=1e9+7;\n        int n=nums.size();\n        int result=0;\n        vector<vector<int>> dp(n+1,vector<int>(k+1,0));\n        //dp[upto i elements][with sum j]\n        dp[0][0]=1;\n        for(int i=1;i<=n;i++){\n            for(int j=0;j<=k;j++){\n                //Not Take:\n                dp[i][j]=(dp[i-1][j]*2)%val;\n                //Take\n                if(j>=nums[i-1]){\n                    dp[i][j]=(dp[i][j]+dp[i-1][j-nums[i-1]])%val;\n                }\n            }\n        }\n\n        return dp[n][k];\n    }\n};\n```
['C++']