Proof of zero count
Intuition\nThis is a mathematical question.\n\nFirstly, let\'s review AND operator:\n0 & 1 = 0\n1 & 0 = 0\n0 & 0 = 0\n1 & 1 = 1\nAnd for number A=3 and B=5,\nA&
# Intuition\nThis is a mathematical question.\n\nFirstly, let\'s review `AND` operator:\n0 & 1 = 0\n1 & 0 = 0\n0 & 0 = 0\n1 & 1 = 1\nAnd for number `A=3` and `B=5`,\nA&B = 3 & 5 = 011b & 101b = (0&1)*2^2 + (1&0)*2^1 + (1&1)&2^0 = 1\nIt can be deduced that:\n**A & B <= A,\nA & B <= B**\n\nThen let\'s look at the second condition described by the subject:\n> The sum of scores of the subarrays is the minimum possible.\n\nImagine `Z` is the value of all elem\'s `AND` in the array nums, \nZ = nums[0] & nums[1] & ... & nums[n-1]\nSo **Z must be the minimum score**\n\nImagine the array can be splited to two subarrays, which is Z1 and Z2,\nZ = Z1 & Z2, so Z <= Z1, Z<=Z2\nAnd if Z = Z1 + Z2,\nIt can be deduced that Z==0, Z1==0, Z2==0\nAnd it is the same with if Z can be splited into three subarrays, or more, it will be Z==0, Z1 == Z2 == ... == Zn == 0 \n\nSo the problem became:\n1, if the minimum score Z != 0, there can be only one array can get the minimum socre, which is the whole array;\n\n2, if the minimum score Z == 0, it is equal to count how many subarray\'s `AND` is zero\n\n# Code\n```\nfunc maxSubarrays(nums []int) int {\n    ans, val := 0, 0\n    for _, num := range nums {\n        if val == 0 {\n            val = num\n        } else {\n            val &= num\n        }\n        if val == 0 {ans++}\n    }\n    if ans == 0 {return 1}\n    return ans\n}\n```
['Go']