[ARC092D] Two Sequences
Time Limit: 3 sec / Memory Limit: 256 MB
难度:\(4.0\)
-
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.
给定两个长度为 \(n\) 的正整数数组 \(a,b\) ,求 \(\forall 1 \leq i,j \leq n\),\(a_i+b_j\) 在二进制下的异或和 。
-
Input
\(n\) 和两数组 \(a,b\) 。
-
Output
答案。
-
Sample Input
1 2 3 |
5 1 2 3 4 5 1 2 3 4 5 |
-
Sample Output
1 |
2 |
-
Constraints