Easy C++ solution
\n# Code\n\nclass Solution {\npublic:\n    int maxSubarrays(vector<int>& nums) {\n        int res=nums[0];\n        for(int i=1;i<nums.size();i++) res=(res&nums
\n# Code\n```\nclass Solution {\npublic:\n    int maxSubarrays(vector<int>& nums) {\n        int res=nums[0];\n        for(int i=1;i<nums.size();i++) res=(res&nums[i]);\n        if(res!=0) return 1;\n        int cnt=0;\n        int j=0;\n        int val=nums[j];\n        while(j<nums.size())\n        {\n            if(val==0)\n            {\n                if(j+1<nums.size()) val=nums[j+1];\n                cnt++;\n            }\n            j++;\n            if(j<nums.size()) val=(val&nums[j]);\n        }\n        return cnt;\n    }\n};\n```
['C++']