python3   ||   8 lines, bits    ||  T/S: 53% / 38%
\nclass Solution:\n    def smallestSubarrays(self, nums: List[int]) -> List[int]:        \n\n        n, ans, bits = len(nums), deque(), defaultdict(int)\n\n    
```\nclass Solution:\n    def smallestSubarrays(self, nums: List[int]) -> List[int]:        \n\n        n, ans, bits = len(nums), deque(), defaultdict(int)\n\n        for i in range(n-1, -1, -1:\n            I = i\n\n            for b in range(31):\n\n                if nums[i] & (1 << b): bits[b] = i\n                elif b in bits and I < bits[b]: I = bits[b] \n\n            ans.appendleft(I+1-i)\n\n        return ans\n```\t\n[https://leetcode.com/problems/smallest-subarrays-with-maximum-bitwise-or/submissions/1288445441/](https://leetcode.com/problems/smallest-subarrays-with-maximum-bitwise-or/submissions/1288445441/)\n\nI could be wrong, but I think that time complexity is *O*(*N*) and space complexity is *O*(1), in which *N* ~ `len(nums)`. (We assume that *bit-count*  <= 32)
['Python']