F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

ZYB loves Xor II

Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 626    Accepted Submission(s): 232


Problem Description
ZYB loves xor very much.Now he gets two arrays A and B.The length of A and B are both n.ZYB wants to know the xor of all $(A_i+B_j)$ $(i,j \in [1,n])$.
The xor of an array $B$ is defined as $B_1$ $xor$ $B_2$ $xor$....$xor$ $B_n$
 

Input
Multiple test cases, the first line contains an integer T(no more than 10), indicating the number of cases. Each test case contains three lines
In the first line there is an integer n.
In the second line there are n integers $A_1,A_2...A_n$
In the third line there are n integers $B_1,B_2...B_n$
$n \in [1,10^5]$£¬$A_i,B_i \in [0,2^{60}]$
The sum of all $n$ is no more than $2*10^5$
 

Output
For each case, the output should occupies exactly one line. The output format is Case #x: ans, here x is the data number begins at 1.
 

Sample Input
1 5 8 11 30 28 0 28 27 22 0 0
 

Sample Output
Case #1: 34
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-22 11:52:45, Gzip enabled