BEATS 100% C++ SOLUTIONS
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)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:O(N)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```cpp []\nclass Solution {\npublic:\n#define ll int\n#define pb push_back\n    int maxSubarrays(vector<int>& nums) {\n        vector<ll> a(nums.size());\n        ll ans=((1<<30)-1);\n        for(ll i=a.size()-1;i>=0;i--){\n            ans=(ans&nums[i]);\n            a[i]=ans;\n        }\n        ll x=((1<<30)-1);\n        ll y=x;\n        ll Ans=1;\n        for(ll i=0;i<(nums.size()-1);i++){\n            y=(y&nums[i]);\n            if(y+a[i+1]==ans){Ans++; y=x;}\n        }\n        return Ans;\n    }\n};\n```
['C++']