func_code_string: #include <bits/stdc++.h>   using namespace std;   const int maxN = 1000005;   int n, a[maxN], p[230], b[230];   bool bo[1 << 22];   void Init() {     scanf( %d , &n);     for (int i = 1; i <= n; ++i) scanf( %d , a + i);   }   void Work() {     int ans = 0;     for (int i = 1; i <= n; ++i) {       for (int j = 1; j <= 20; ++j) {         while (p[j] <= n && (p[j] < i || ((a[p[j]] >> (j - 1)) & 1) == 0)) ++p[j];         b[j] = p[j];       }       sort(b + 1, b + 1 + 20);       int x = a[i];       if (!bo[x]) {         ++ans;         bo[x] = 1;       }       for (int j = 1; j <= 20; ++j) {         x |= a[b[j]];         if (!bo[x]) {           ++ans;           bo[x] = 1;         }       }     }     cout << ans << endl;   }   int main() {     Init();     Work();     return 0;   }   