异或——Red Scarf

Red Scarf

P r o b l e m S t a t e m e n t \color{blue}Problem Statement ProblemStatement
There are N N N Snuke Cats numbered 1 , 2 , … , N 1,2,…,N 1,2,,N, where N N 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).

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.

C o n s t r a i n t s \color{blue}Constraints Constraints
All values in input are integers. 2 ≤ N ≤ 200000 2≤N≤200000 2N200000, N N N is even. 0 ≤ a i ≤ 1 0 9 0≤a_i≤10^9 0ai109
There exists a combination of integers on the scarfs that is consistent with the given information.

I n p u t \color{blue}Input Input
Input is given from Standard Input in the following format:

N
a1 
a2 
… 
aN

O u t p u t \color{blue}Output Output
Print a line containing

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值