func_code_string: #include <bits/stdc++.h>   using namespace std;   const int nax = 4e5 + 5;   int ans[nax];   int b[nax];   int n;   bool solve(int bb) {     vector<int> a;     int val = (1 << (bb));     int val2 = val * 2;     int val3 = val * 3;     int val4 = val * 4;     for (int i = 1; i <= n; i++) {       a.push_back(b[i] & ((1 << (bb + 1)) - 1));     }     sort(a.begin(), a.end());     int hi2 = n - 1;     int hi1 = n - 1;     long long ans = 0;     for (int i = 0; i < n; i++) {       hi1 = min(hi1, n - 1);       while (hi1 >= i && a[i] + a[hi1] >= val) hi1--;       if (a[i] + a[hi1] < val) hi1++;       hi1 = max(hi1, i + 1);       while (hi2 >= 0 && a[i] + a[hi2] >= val2) hi2--;       ans += max(0, hi2 - hi1 + 1);     }     hi2 = n - 1;     hi1 = n - 1;     for (int i = 0; i < n; i++) {       hi1 = min(hi1, n - 1);       while (hi1 >= i && a[i] + a[hi1] >= val3) hi1--;       if (a[i] + a[hi1] < val3) hi1++;       hi1 = max(hi1, i + 1);       while (hi2 >= 0 && a[i] + a[hi2] >= val4) hi2--;       ans += max(0, hi2 - hi1 + 1);     }     return ans % 2;   }   void brut() {     int ans = 0;     for (int i = 1; i <= n; i++) {       for (int j = i + 1; j <= n; j++) ans ^= (b[i] + b[j]);     }     cout << ans << endl;   }   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cin >> n;     for (int i = 1; i <= n; i++) cin >> b[i];     int ans = 0;     for (int i = 0; i <= 27; i++) {       if (solve(i)) ans += (1 << i);     }     cout << ans << endl;     return 0;   }   