C++ || TOO EASY CLEAN SHORT
\n\n# Code\n\nclass Solution {\npublic:\n    long long maximumOr(vector<int>& a, int k) {\n      map<int,long long> p,q;\n      int n=a.size();\n      int x=0;\
\n\n# Code\n```\nclass Solution {\npublic:\n    long long maximumOr(vector<int>& a, int k) {\n      map<int,long long> p,q;\n      int n=a.size();\n      int x=0;\n      for(int i=0;i<n;i++)\n      {\n          x=x|a[i];\n          p[i]=x;\n      }\n      x=0;\n      for(int i=n-1;i>=0;i--)\n      {\n          x=x|a[i];\n          q[i]=x;\n      }\n      long long int l=0;\n      for(int i=0;i<n;i++)\n      {\n          int d=k;\n          long long int f=a[i];\n          while(d--)\n          f=f*2*1LL;\n          f=f|p[i-1];\n          f=f|q[i+1];\n          l=max(l,f);\n      }\n      return l;\n    }\n};\n```
['C++']