Small and Fast Solution (59ms)
Intuition\n Describe your first thoughts on how to solve this problem. \nThinking of collecting of disjoint numbers (who\'s and will result in zero. zero is the
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nThinking of collecting of disjoint numbers (who\'s and will result in zero. zero is the minimum possible score they can have).\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nCount the number of continuous sub arrays which result is score = 0. if some array not able to score 0 then merge it with existing arrays. if there is no existing array then take whole array as 1.\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```\n#pragma GCC optimize("O3,unroll-loops")\n#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")\nint speedup = []{ ios::sync_with_stdio(0); cin.tie(0); return 0; }();\nclass Solution {\npublic:\n    int maxSubarrays(vector<int>& nums) {\n        int count =0;\n        int andy = INT_MAX;\n        for (int i=0;i<nums.size();i++){\n            if (andy & nums[i]){\n                andy &= nums[i];\n            }else{\n                count++;\n                andy = INT_MAX;\n            }\n        }\n        if (count == 0){\n            return 1;\n        }else{\n            return count;\n        }\n    }\n};\n```
['C++']