Beats 100% C++ solution with O(N) T.C and O(1) S.C
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(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```cpp []\nclass Solution {\npublic:\n#define ll int\n    int maxSubarrays(vector<int>& nums) {\n        ll ans=0, val=((1<<30)-1);\n        for(ll i=0;i<nums.size();i++){\n            val&=nums[i];\n            if(val==0){ans++; val=((1<<30)-1);}\n        }\n        if(ans==0){ans++;}\n        return ans;\n    }\n};\n```
['C++']