Shubham and Xor
/

## Algorithms, Bubble sort algorithm, Linear search, Searching algorithm, Sorting

Problem
Editorial
Analytics

You are given an array of n integer numbers $a_1$, $a_2$, .. ,$a_n$. Calculate the number of pair of indices $(i,j)$ such that $1\le i$ < $j\le n$ and $a_i$ xor $a_j = 0$

Input format
- First line: n denoting the number of array elements
- Second line: n space separated integers $a_1$, $a_2$, .. ,$a_n$.

Output format
Output the required number of pairs.

Constraints
$1\le n\le 10^6$
$1 \le a_i \le 10^9$

SAMPLE INPUT
5
1 3 1 4 3

SAMPLE OUTPUT
2

Explanation

The 2 pair of indices are $(1,3)$ and $(2,5)$ .

Time Limit: 1.0 sec(s) for each input file.
Memory Limit: 256 MB
Source Limit: 1024 KB

## This Problem was Asked in

Initializing Code Editor...