Given an 1D integer array A containing N distinct integers.
Find the number of unique pairs of integers in the array whose XOR is equal to B.
NOTE:
Problem Constraints
1 <= N <= 105
1 <= A[i], B <= 107
Input Format
First argument is an 1D integer array A.
Second argument is an integer B.
Output Format
Return a single integer denoting the number of unique pairs of integers in the array A whose XOR is equal to B.
Example Input
Input 1:
A = [5, 4, 10, 15, 7, 6]
B = 5
Input 2:
A = [3, 6, 8, 10, 15, 50]
B = 5
Example Output
Output 1: