Nội dung Bài tập
Mã:
ABC171.BaiE
Tên:
ABC171.BaiE
Dạng thi:
oi
Thang điểm:
100 điểm
Giới hạn thời gian:
1 giây
Giới hạn bộ nhớ:
256 MB
Được tạo bởi:
admin

Problem Statement

There are N Snuke Cats numbered 1,2,,N, where N is even.

Each Snuke Cat wears a red scarf, on which his favorite non-negative integer is written.

Recently, they learned the operation called xor (exclusive OR).

What is xor?

They wanted to use this operation quickly, so each of them calculated the xor of the integers written on their scarfs except his scarf.

We know that the xor calculated by Snuke Cat i, that is, the xor of the integers written on the scarfs except the scarf of Snuke Cat i is ai. Using this information, restore the integer written on the scarf of each Snuke Cat.

Constraints

  • All values in input are integers.
  • 2N200000
  • N is even.
  • 0ai109
  • There exists a combination of integers on the scarfs that is consistent with the given information.

Input

Input is given from Standard Input in the following format:

N
a1 a2  aN

Output

Print a line containing N integers separated with space.

The i-th of the integers from the left should represent the integer written on the scarf of Snuke Cat i.

If there are multiple possible solutions, you may print any of them.


Sample Input 1 Copy

Copy
4
20 11 9 24

Sample Output 1 Copy

Copy
26 5 7 22
  • 5 xor 7 xor 22=20
  • 26 xor 7 xor 22=11
  • 26 xor 5 xor 22=9
  • 26 xor 5 xor 
        Quảng cáo
       Ngôn ngữ : 

       Theme : 
Mời bạn soạn code



		



      Ai có thể xem bài này : 

Thông tin



Phần thảo luận