LearnPy Hub
← Arena
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
solution.py
Output appears here
Pairs With XOR k · Python Arena problem · LearnPy Hub