Super Weird!!!!!!!!!
\nclass Solution {\n    public int[] smallestSubarrays(int[] nums) {\n        int max[]=new int[33],i,j=-1,arr[]=new int[33],n=nums.length,x=0, res[]= new int[n
```\nclass Solution {\n    public int[] smallestSubarrays(int[] nums) {\n        int max[]=new int[33],i,j=-1,arr[]=new int[33],n=nums.length,x=0, res[]= new int[n];\n        for(int num: nums){\n            x=x|num;\n        }\n        or(max,x,1);\n        for(i=0;i<n;i++){\n            while(j<n && !isEqual(arr,max)){\n                j++;\n                if(j<n) or(arr,nums[j],1);\n                if(j==n){\n                    for(int lp=0;lp<33;lp++){\n                        max[lp]=arr[lp];\n                        arr[lp]=0;\n                    }\n                    j=i-1;\n                }\n            }\n            res[i]=Math.max(j-i+1,1);\n            if(j==n) res[i]--;\n            or(arr,nums[i],-1);\n        }\n        return res;\n    }\n    boolean isEqual(int arr[], int max[]){\n        for(int i=0;i<arr.length;i++){\n            if(arr[i]*max[i]==0 && arr[i]+max[i]!=0)return false;\n        }\n        return true;\n    }\n    void or(int arr[], int num, int val){\n        int i=0;\n        while(num>0){\n            if((num&1)==1){\n                arr[i]+=val;\n            }\n            i++;\n            num=num>>1;\n        }\n    }\n}\n```
['Java']