So this problem is bugging me for a while,

```
class Solution {
public:
int subarrayBitwiseORs(vector<int>& A) {
if(A.size()<=1) return A.size();
set<int> s;
for(int i=0;i<A.size();i++){
s.insert(A[i]);
int res=A[i];
for(int j=i+1;j<A.size();j++){
res|=A[j];
s.insert(res);
}
}
return s.size();
}
};
```

This results in TLE as expected, more efficient solution ideas are welcome