Count Zeros Xor Pairs

easy
1. Given an array A[] of size N. 
2. Find the number of pairs (i, j) such that A[i] XOR A[j] = 0, and 1 <= i < j <= N.

Input Format

Input is managed for you

Output Format

Output is managed for you

Constraints

2 <= N <= 10^5
1 <= A[i] <= 10^5

Notice

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

Example

Input
6
1 3 1 3 1 1
Output
7
Previous
Capacity To Ship Packages Within D Days
Next
Find The Element That Appears Once In Sorted Array

Related Questions