Why DP sol getting TLE O( N * min(1<<N,2000))  ??
\n#define ll long long\nclass Solution {\npublic:\n    long long kSum(vector<int>& nums, int k) {\n        int n = nums.size();\n        vector<ll> dp(1);\n\n  
```\n#define ll long long\nclass Solution {\npublic:\n    long long kSum(vector<int>& nums, int k) {\n        int n = nums.size();\n        vector<ll> dp(1);\n\n        for (int i = 1; i <= n; i++) {\n            int size = (int)dp.size();\n            for (int j = 0; j < size; j++) {\n                dp.push_back(dp[j] + nums[i - 1]);\n            }\n            sort(dp.begin(), dp.end(), greater<ll>());\n            dp.resize(min((int)dp.size(),2000));\n        }\n        return dp[k-1];\n    }\n};\n```
['Dynamic Programming']