# [ARC092D] Two Sequences

Time Limit: 3 sec / Memory Limit: 256 MB

• ### Problem Statement

You are given two integer sequences, each of length $$N$$: $$a_1, \cdots ,a_N$$ and $$b_1, \cdots ,b_N$$.

There are $$N^2$$ ways to choose two integers $$i$$ and $$j$$ such that $$1 \leq i,j \leq N$$. For each of these $$N^2$$ pairs, we will compute $$a_i+b_j$$ and write it on a sheet of paper. That is, we will write $$N^2$$ integers in total.

Compute the XOR of these $$N^2$$ integers.

• ### Input

$$n$$ 和两数组 $$a,b$$ 。

• ### Constraints

$$1 \leq n \leq 200000$$，$$1 \leq a_i,b_j \leq 2^{28}$$。

Source：ARC092D

from orz zzx：

from sb mnihyc：

「单调性扫一扫」想得不是很清楚的可以直接排序+二分。