c++ solution
\nclass Solution {\npublic:\n    int maxSubarrays(vector<int>& nums) {\n        int result=0;\n        int currentAnd=-1;\n        for(int i=0;i<nums.size();i++
```\nclass Solution {\npublic:\n    int maxSubarrays(vector<int>& nums) {\n        int result=0;\n        int currentAnd=-1;\n        for(int i=0;i<nums.size();i++)\n        {\n            currentAnd&=nums[i];\n            if(currentAnd==0)\n            {\n                result++;\n                currentAnd=-1;\n            }\n        }\n        return result?result:1;\n    }\n};\n```
['C', 'C++']