func_code_string: #include <bits/stdc++.h>   const int maxn = 5e5 + 5;   const int logn = 21;   const int lim = 2e1;   const int maxq = 5e5 + 5;   struct w {     int l, r, id;     friend bool operator<(w now, w oth) { return now.r < oth.r; }   } qu[maxq];   int b[logn], p[logn];   void insert(int gave, int id) {     for (int i = lim; i >= 0; i--) {       if (!(gave >> i & 1)) continue;       if (!b[i]) {         b[i] = gave;         p[i] = id;         return;       }       if (p[i] < id) {         std::swap(p[i], id);         std::swap(b[i], gave);       }       gave ^= b[i];     }     return;   }   int tian(int lef) {     int r = 0;     for (int i = lim; i >= 0; i--)       if (p[i] >= lef) r = std::max(r, r ^ b[i]);     return r;   }   int o[maxq];   int n, q;   int v[maxn];   signed main() {     scanf( %d , &n);     for (int i = 1; i <= n; i++) scanf( %d , v + i);     scanf( %d , &q);     for (int i = 1; i <= q; i++) {       scanf( %d%d , &qu[i].l, &qu[i].r);       qu[i].id = i;     }     std::sort(qu + 1, qu + q + 1);     int nr = 0;     for (int i = 1; i <= q; i++) {       while (nr < qu[i].r) {         nr++;         insert(v[nr], nr);       }       o[qu[i].id] = tian(qu[i].l);     }     for (int i = 1; i <= q; i++) printf( %d n , o[i]);     return 0;   }   