Python bit manipulation
Intuition\n Describe your first thoughts on how to solve this problem. \nAll the credit in this post goes to lee215. I simply write down my notes.\n1. x & y <= 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nAll the credit in this post goes to lee215. I simply write down my notes.\n1. **x & y <= x**  and  **x && y <= y**;\n2. nums[0] AND nums[1] AND ... AND nums[-1] < = nums[l] AND nums[l + 1] AND ... AND nums[r].\nEquivalent to **score(array) <= score(subarray)**;\n3. If score(array) >= 1, then there\'s no need to split it because the sum of the scores of subarrays must be larger than score(array);\n4. If score(array) == 0, then we may try spliting it.\n5. When we can split the array into subarrays? \nWe can calculate the prefix score, setting the initial prefix score as 2^31 -1 (all the bits are 1 in binary format). Then we start traversing the array, when the prefix score becomes zero, then we can split it, and then we shall reset the prefix to 2^31 - 1.\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nO(n)\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO(1)\n# Code\n```\nclass Solution:\n    def maxSubarrays(self, nums: List[int]) -> int:\n        prefix = 2 ** 31 - 1\n        res = 0\n        for num in nums:\n            prefix &= num\n            if prefix == 0:\n                res += 1\n                prefix = 2 ** 31 - 1\n        \n        return max(1, res)\n```
['Python3']