C++
\nclass Solution {\npublic:\n    int maxSubarrays(vector<int>& nums) {\n        int count0 = (nums[0] == 0);        \n        int n = nums.size();\n        int 
```\nclass Solution {\npublic:\n    int maxSubarrays(vector<int>& nums) {\n        int count0 = (nums[0] == 0);        \n        int n = nums.size();\n        int var = nums[0];\n        for(int i = 1; i < n; i++){\n            count0 += (nums[i] == 0);\n            var &= nums[i];\n        }\n        if(var != 0)\n            return 1;\n        int idx = 0;\n        int ret = count0;\n        while(idx < n){\n            if(nums[idx] == 0){\n                idx++;\n                continue;\n            }\n            int tmp = nums[idx];\n            idx++;\n            while(idx < n){\n                if(nums[idx] == 0){\n                    break;\n                }\n                tmp &= nums[idx];\n                if(tmp == 0){\n                    ret++;\n                    idx++;\n                    break;\n                }\n                idx++;\n            }\n        }\n        return ret;\n    }\n};\n```
[]