Language: C++

typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<ll,ll> P;
int N;
vector<ll> A,B;

int main(void)
{
  cin >> N;
  for (int i = 0; i < N; ++i)
    {
      ll a;
      cin >> a;
      A.push_back(a);
    }
  for (int i = 0; i < N; ++i)
    {
      ll b;
      cin >> b;
      B.push_back(b);
    }
  ll res=0;
  for(int digit=29;digit>=0;digit--)
    {
      ll high=1LL<<(digit+1);
      ll low=1LL<<(digit);
      for (int i = 0; i < N; ++i)
	{
	  A[i]%=high;
	  B[i]%=high;
	}
      sort(B.begin(),B.end());
      ll num=0;
      for (int i = 0; i < N; ++i)
	{
	  ll add=0;
	  if(low-A[i]>=0)
	    {
	      add+=lower_bound(B.begin(),B.end(),high-A[i])-lower_bound(B.begin(),B.end(),low-A[i]);
	    }
	  else
	    {
	      add+=lower_bound(B.begin(),B.end(),high-A[i])-B.begin();
	      add+=lower_bound(B.begin(),B.end(),high)-lower_bound(B.begin(),B.end(),high+low-A[i]);
	    }
	  num+=add;
	}
      if(num&1) res+=low;
    }
  cout << res << endl;
  return 0;
}


Compiler output:
a.cc:1:9: error: 'vector' does not name a type
    1 | typedef vector<int> vi;
      |         ^~~~~~
a.cc:2:9: error: 'vector' does not name a type
    2 | typedef vector<ll> vll;
      |         ^~~~~~
a.cc:3:9: error: 'pair' does not name a type
    3 | typedef pair<ll,ll> P;
      |         ^~~~
a.cc:5:1: error: 'vector' does not name a type
    5 | vector<ll> A,B;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:9:3: error: 'cin' was not declared in this scope
    9 |   cin >> N;
      |   ^~~
a.cc:12:7: error: 'll' was not declared in this scope
   12 |       ll a;
      |       ^~
a.cc:13:14: error: 'a' was not declared in this scope
   13 |       cin >> a;
      |              ^
a.cc:14:7: error: 'A' was not declared in this scope
   14 |       A.push_back(a);
      |       ^
a.cc:18:7: error: 'll' was not declared in this scope
   18 |       ll b;
      |       ^~
a.cc:19:14: error: 'b' was not declared in this scope
   19 |       cin >> b;
      |              ^
a.cc:20:7: error: 'B' was not declared in this scope
   20 |       B.push_back(b);
      |       ^
a.cc:22:3: error: 'll' was not declared in this scope
   22 |   ll res=0;
      |   ^~
a.cc:25:9: error: expected ';' before 'high'
   25 |       ll high=1LL<<(digit+1);
      |         ^~~~~
      |         ;
a.cc:26:9: error: expected ';' before 'low'
   26 |       ll low=1LL<<(digit);
      |         ^~~~
      |         ;
a.cc:29:11: error: 'A' was not declared in this scope
   29 |           A[i]%=high;
      |           ^
a.cc:29:17: error: 'high' was not declared in this scope
   29 |           A[i]%=high;
      |                 ^~~~
a.cc:30:11: error: 'B' was not declared in this scope
   30 |           B[i]%=high;
      |           ^
a.cc:32:12: error: 'B' was not declared in this scope
   32 |       sort(B.begin(),B.end());
      |            ^
a.cc:32:7: error: 'sort' was not declared in this scope; did you mean 'short'?
   32 |       sort(B.begin(),B.end());
      |       ^~~~
      |       short
a.cc:33:9: error: expected ';' before 'num'
   33 |       ll num=0;
      |         ^~~~
      |         ;
a.cc:36:13: error: expected ';' before 'add'
   36 |           ll add=0;
      |             ^~~~
      |             ;
a.cc:37:14: error: 'low' was not declared in this scope
   37 |           if(low-A[i]>=0)
      |              ^~~
a.cc:37:18: error: 'A' was not declared in this scope
   37 |           if(low-A[i]>=0)
      |                  ^
a.cc:39:15: error: 'add' was not declared in this scope
   39 |               add+=lower_bound(B.begin(),B.end(),high-A[i])-lower_bound(B.begin(),B.end(),low-A[i]);
      |               ^~~
a.cc:39:50: error: 'high' was not declared in this scope
   39 |               add+=lower_bound(B.begin(),B.end(),high-A[i])-lower_bound(B.begin(),B.end(),low-A[i]);
      |                                                  ^~~~
a.cc:39:20: error: 'lower_bound' was not declared in this scope
   39 |               add+=lower_bound(B.begin(),B.end(),high-A[i])-lower_bound(B.begin(),B.end(),low-A[i]);
      |                    ^~~~~~~~~~~
a.cc:43:15: error: 'add' was not declared in this scope
   43 |               add+=lower_bound(B.begin(),B.end(),high-A[i])-B.begin();
      |               ^~~
a.cc:43:50: error: 'high' was not declared in this scope
   43 |               add+=lower_bound(B.begin(),B.end(),high-A[i])-B.begin();
      |                                                  ^~~~
a.cc:43:20: error: 'lower_bound' was not declared in this scope
   43 |               add+=lower_bound(B.begin(),B.end(),high-A[i])-B.begin();
      |                    ^~~~~~~~~~~
a.cc:46:11: error: 'num' was not declared in this scope; did you mean 'enum'?
   46 |           num+=add;
      |           ^~~
      |           enum
a.cc:46:16: error: 'add' was not declared in this scope
   46 |           num+=add;
      |                ^~~
a.cc:48:10: error: 'num' was not declared in this scope; did you mean 'enum'?
   48 |       if(num&1) res+=low;
      |          ^~~
      |          enum
a.cc:48:17: error: 'res' was not declared in this scope
   48 |       if(num&1) res+=low;
      |                 ^~~
a.cc:48:22: error: 'low' was not declared in this scope
   48 |       if(num&1) res+=low;
      |                      ^~~
a.cc:50:3: error: 'cout' was not declared in this scope
   50 |   cout << res << endl;
      |   ^~~~
a.cc:50:11: error: 'res' was not declared in this scope
   50 |   cout << res << endl;
      |           ^~~
a.cc:50:18: error: 'endl' was not declared in this scope
   50 |   cout << res << endl;
      |                  ^~~~