IntermediateRating 1300
Pairs With XOR k
Count the pairs i < j with aᵢ XOR aⱼ = k.
Input
n and k, then n non-negative integers.
Output
One integer.
Sample 1
Input
5 2 3 6 8 10 15
Output
1
Sample 2
Input
4 0 1 1 1 1
Output
6
Output appears heren and k, then n non-negative integers.
One integer.
5 2 3 6 8 10 15
1
4 0 1 1 1 1
6
Output appears here