Easy Bit Solution
cpp\nclass Solution {\npublic:\n    vector<int> smallestSubarrays(vector<int> &nums) {\n        int n = nums.size();\n        vector<int> res, bit(32, -1);\n   
```cpp\nclass Solution {\npublic:\n    vector<int> smallestSubarrays(vector<int> &nums) {\n        int n = nums.size();\n        vector<int> res, bit(32, -1);\n        for (int i = n - 1; i >= 0; i--) {\n            int idx = i;\n            for (int j = 0; j < 32; j++) {\n                if (nums[i] & (1 << j)) bit[j] = i;\n                idx = max(idx, bit[j]);\n            }\n            res.push_back(idx - i + 1);\n        }\n        reverse(res.begin(), res.end());\n        return res;\n    }\n};\n```
['Bit Manipulation', 'C', 'C++']