# Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

You are given ** n** integers as

Firstly, you have to find the XORs of all of the pairs that can be formed from the given integers. That means, *XOR (**a _{i}*

Finally, your ultimate goal is to find the cumulative XOR of previously found XORs of each pair.

Input starts with an integer ** T** (≤

The first line of each test case contains an integer *n (2 **≤ n ≤ **10 ^{5}*

For each case, print a single line containing **a single integer** which denotes the final result.

Input | Output |
---|---|

2 2 3 4 5 1 2 2 4 5 | 7 0 |

50% Solution Ratio

sakibalaminEarliest,

subhashis_cseFastest, 0.1s

dip_BRURLightest, 131 kB

saquib2508Shortest, 165B

Login to submit