Video Explanation (Step by step solution with all proofs)
Explanation\n\nClick here for the video\n\n# Code\n\nclass Solution {\npublic:\n    int maxSubarrays(vector<int>& nums) {\n        int ands = nums[0];\n        
# Explanation\n\n[Click here for the video](https://youtu.be/2NExS_6bLP4)\n\n# Code\n```\nclass Solution {\npublic:\n    int maxSubarrays(vector<int>& nums) {\n        int ands = nums[0];\n        for (auto i : nums) ands &= i;\n        \n        if (ands != 0) return 1;\n        \n        int n = nums.size();\n        int result = 0;\n        \n        for (int j = 0; j < n; j ++) {\n            int currentAnd = nums[j];\n            while (j+1 < n && currentAnd != 0) {\n                j ++;\n                currentAnd &= nums[j];\n            }\n            if (currentAnd == 0) result ++;\n        }\n        return result;\n    }\n};\n```
['C++']