Language: C++

#include<bits/stdc++.h>
#define calc(l,r) max(0,(int)(upper_bound(t,t+n,r)-lower_bound(t,t+n,l)))
int n,a[200005],b[200005];
long long ans,t[200005];
int main(){cin>>n;
	for(int i=0;i<n;i++)cin>>a[i];
	for(int i=0;i<n;i++)cin>>b[i];
	for(int i=0;i<32;i++){
		for(int j=0;j<n;j++)t[j]=b[j]&(1ll<<i+1)-1;
		sort(t,t+n);
		for(int j=0;j<n;j++){
			int x=a[j]&(1ll<<i+1)-1;
			if(calc((1ll<<i)-x,(1ll<<i+1)-x-1)+calc((1ll<<i+1)+(1ll<<i)-x,(1ll<<i+2)-x-1)&1)ans^=1ll<<i;
		}
	}cout<<ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 | int main(){cin>>n;
      |            ^~~
      |            std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:10:17: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
   10 |                 sort(t,t+n);
      |                 ^~~~
      |                 std::sort
In file included from /usr/include/c++/14/algorithm:86,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
a.cc:2:31: error: 'upper_bound' was not declared in this scope; did you mean 'std::upper_bound'?
    2 | #define calc(l,r) max(0,(int)(upper_bound(t,t+n,r)-lower_bound(t,t+n,l)))
      |                               ^~~~~~~~~~~
a.cc:13:28: note: in expansion of macro 'calc'
   13 |                         if(calc((1ll<<i)-x,(1ll<<i+1)-x-1)+calc((1ll<<i+1)+(1ll<<i)-x,(1ll<<i+2)-x-1)&1)ans^=1ll<<i;
      |                            ^~~~
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:2050:5: note: 'std::upper_bound' declared here
 2050 |     upper_bound(_ForwardIterator __first, _ForwardIterator __last,
      |     ^~~~~~~~~~~
a.cc:2:52: error: 'lower_bound' was not declared in this scope; did you mean 'std::lower_bound'?
    2 | #define calc(l,r) max(0,(int)(upper_bound(t,t+n,r)-lower_bound(t,t+n,l)))
      |                                                    ^~~~~~~~~~~
a.cc:13:28: note: in expansion of macro 'calc'
   13 |                         if(calc((1ll<<i)-x,(1ll<<i+1)-x-1)+calc((1ll<<i+1)+(1ll<<i)-x,(1ll<<i+2)-x-1)&1)ans^=1ll<<i;
      |                            ^~~~
/usr/include/c++/14/bits/stl_algo.h:1963:5: note: 'std::lower_bound' declared here
 1963 |     lower_bound(_ForwardIterator __first, _ForwardIterator __last,
      |     ^~~~~~~~~~~
a.cc:2:19: error: 'max' was not declared in this scope; did you mean 'std::max'?
    2 | #define calc(l,r) max(0,(int)(upper_bound(t,t+n,r)-lower_bound(t,t+n,l)))
      |                   ^~~
a.cc:13:28: note: in expansion of macro 'calc'
   13 |                         if(calc((1ll<<i)-x,(1ll<<i+1)-x-1)+calc((1ll<<i+1)+(1ll<<i)-x,(1ll<<i+2)-x-1)&1)ans^=1ll<<i;
      |                            ^~~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:15:10: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 |         }cout<<ans;
      |          ^~~~
      |          std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~