#d2926. 字典序最小的异或数组
字典序最小的异或数组
Lexicographically Smallest XOR Array
Problem Description
You are given two arrays and , both of length . You may rearrange the order of array arbitrarily, and define
Find, among all possible arrays , the lexicographically smallest one.
Input Format
The first line contains an integer .
The second line contains space-separated integers, the array .
The third line contains space-separated integers, the array .
Output Format
Output one line of space-separated integers — the lexicographically smallest .
Sample Input 1
3
520 1314 61
1389 104 577
Sample Output 1
73 79 85
Sample Input 2
3
8 4 13
17 2 7
Sample Output 2
10 3 28
Sample Input 3
3
0 0 0
17 2 7
Sample Output 3
2 7 17
Constraints
Hint
It is obvious that .