Language: C++

#include <bits/stdc++.h>
using namespace std;

typedef long long int ll;
typedef pair<ll, ll> pll;

#define FOR(i, n, m) for (ll(i) = (m); (i) < (n); ++(i))
#define REP(i, n) FOR(i, n, 0)
#define OF64 std::setprecision(10)

const ll MOD = 1000000007;
const ll INF = (ll)1e15;

int N;
ll A[200005];
ll B[200005];
ll D[35];

//! under以上になる最小のindex
inline int getUnder(vector<ll> c, ll under)
{
    int ok = N, ng = -1;
    while (abs(ok - ng) > 1)
    {
        int mid = (ok + ng) / 2;
        if (c[mid] >= under)
        {
            ok = mid;
        }
        else
        {
            ng = mid;
        }
    }
    return ok;
}
//! top未満になる最大のindex
inline int getTop(vector<ll> c, ll top)
{
    int ok = -1, ng = N;
    while (abs(ok - ng) > 1)
    {
        int mid = (ok + ng) / 2;
        if (c[mid] < top)
        {
            ok = mid;
        }
        else
        {
            ng = mid;
        }
    }
    return ok;
}

int main()
{
    cin >> N;
    REP(i, N)
    {
        cin >> A[i];
    }
    REP(i, N)
    {
        cin >> B[i];
    }
    REP(i, 31)
    {
        ll m = 0;
        REP(j, i)
        {
            m |= (1 << j);
        }
        vector<ll> c;
        REP(j, N)
        {
            c.push_back(B[j] & m);
        }
        sort(c.begin(), c.end());

        ll u = pow(2, i);
        ll t = pow(2, (i + 1));
        REP(j, N)
        {
            ll a = A[j] & m;
            {
                int ui = getUnder(i, u - a);
                int ti = getTop(i, t - a);
                if (ui <= ti)
                {
                    D[i] += (ti - ui + 1);
                }
            }
            {
                int ui = getUnder(i, u + t - a);
                int ti = getTop(i, 2 * t - a);
                if (ui <= ti)
                {
                    D[i] += (ti - ui + 1);
                }
            }
        }
    }

    ll ans = 0;
    REP(i, 31)
    {
        ans |= ((D[i] % 2) << i);
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:87:35: error: could not convert 'i' from 'll' {aka 'long long int'} to 'std::vector<long long int>'
   87 |                 int ui = getUnder(i, u - a);
      |                                   ^
      |                                   |
      |                                   ll {aka long long int}
a.cc:88:33: error: could not convert 'i' from 'll' {aka 'long long int'} to 'std::vector<long long int>'
   88 |                 int ti = getTop(i, t - a);
      |                                 ^
      |                                 |
      |                                 ll {aka long long int}
a.cc:95:35: error: could not convert 'i' from 'll' {aka 'long long int'} to 'std::vector<long long int>'
   95 |                 int ui = getUnder(i, u + t - a);
      |                                   ^
      |                                   |
      |                                   ll {aka long long int}
a.cc:96:33: error: could not convert 'i' from 'll' {aka 'long long int'} to 'std::vector<long long int>'
   96 |                 int ti = getTop(i, 2 * t - a);
      |                                 ^
      |                                 |
      |                                 ll {aka long long int}