[Solution] Good Pairs CodeChef Solution | CodeChef Problem Solution 2022
Chef has two arrays and , each of length .
A pair is said to be a good pair if and only if
Here, denotes the bitwise XOR operation.
Determine the number of good pairs.
Input Format
- The first line of input will contain a single integer , denoting the number of test cases. The description of the test cases follows.
Solution Click Below:- CLICK HERE
- Each test case consists of three lines of input:
- The first line contains a single integer — the size of the arrays and .
- The second line contains space-separated integers — the elements of array .
- The third line contains space-separated integers — the elements of array .
Output Format
- For each test case, output on a new line the number of good pairs.
Constraints
- The sum of over all test cases does not exceed
No comments:
Post a Comment