You are on page 1of 3

Given an array Arr of size N.

Find the number of pairs (i.j) in Arr such that arrfil'arrfil>arrtil


Since the answer can be large return it modulo 10+7.

Notes
I t is given that denotes bitwise XOR.

Input Format
the number of
The first line contains an integer, N, denoting
elements in Arr.
contai
Each line i of the N subsequent
lines (where 0si<N)
an integer describing Arr[il

Constraints
1<=N <= 10^5
1<=Arril<= 10^9
1<=N <= 10^5
1 = Arr[il <= 10^9

Sample Input Sample Output

ananth@gmail.copm
Explanation
2 0 No such pairs
6
Com
6

4 6
2 ij={12){1.3).
2 {1.4){2.1)13.1)
4 {4.1}
5
5

5 8 JJ=(2.1).{2.3).
7 . C o
{2.4).4.2).{4.5).
2 (5.1),15.3}154)
7
A
3 J

ww

D u t b o n
Ct C Bash PHP.Clojure,Plaa

You might also like