[C++] why my Code was not working!  , don't use "or" instead of "|"
From today onwards,i\'ll remember or == || \nfor logic or always |\nvery disappointed :(\n# Code\n\nclass Solution {\npublic:\n    #define ll long long\n    ll 
From today onwards,i\'ll remember or == || \nfor logic **or** always **|**\nvery disappointed :(\n# Code\n```\nclass Solution {\npublic:\n    #define ll long long\n    ll memo[100001][16];\n   long long rec(int i,int j,vector<int>&nums,int k)\n   {\n       if(i>=nums.size()) return 0;\n       if(memo[i][j] !=- 1) return memo[i][j];\n       \n       long long with=0;\n       long long without=0;\n       without=nums[i] or rec(i+1,j,nums,k) ;\n       for(int a=1;a<=j;a++)\n       {\n           if(j-a>=0)\n           {\n               long long temp = rec(i+1,j-a,nums,k) ;\n               ll cur=(ll)nums[i]*pow(2,a) ;\n               temp =temp or cur;\n               // cout<<i<<" : "<<a<<" "<<temp<<endl;\n               with=max(temp,with);\n           }   \n       }\n      \n       // cout<<i<<" : "<<j<<" :: "<<with<<" "<<without<<endl;\n       return memo[i][j]=max(with,without);\n   }\n   long long maximumOr(vector<int>& nums, int k) {\n       memset(memo, -1, sizeof(memo));\n       return rec(0,k,nums,k);\n   }\n};\n```
['Dynamic Programming', 'Recursion', 'Memoization', 'C++']