Hello coders, today we are going to solve **XOR Equal CodeChef Solution** whose Problem Code is **PALINT**.

Contents

**Task**

You are given an array ** A** consisting of

**integers and an integer**

*N***. Your goal is to have as many equal integers as possible in the array. To achieve this goal, you can do the following operation:**

*X*Choose an index ** i (1 â‰¤ i â‰¤ N)** and set

**, where âŠ• denotes the bitwise xor operation.**

*A*=_{i}*A*âŠ•_{i}*X*Find the maximum number of equal integers you can have in the final array and the minimum number of operations to obtain these many equal integers.

**Input Format**

- The first line of the input contains a single integer
denoting the number of test cases. The description of**T**test cases follows.*T* - Each test case contains two lines of input.
- The first line of each test case contains two space-separated integers
,*N*.*X* - The second line of each test case contains
space-separated integers**N**.*A1, A2, . . . , AN*

**Output Format**

For each test case, print a single line containing two space-separated integers – first, the maximum number of equal integers in the final array and second, the minimum number of operations to achieve these many equal integers.

**Constraints**

**1 â‰¤***T*â‰¤ 10^{4}**1 â‰¤***N*â‰¤ 10^{5}**0 â‰¤***X*â‰¤ 10^{9}**0 â‰¤***A*â‰¤ 10_{i}^{9}- The sum of
over all test cases does not exceed*N***5â‹…10**^{5}

**Subtasks**

**Subtask #1 (100 points):** Original constraints

**Sample Input 1**

```
3
3 2
1 2 3
5 100
1 2 3 4 5
4 1
2 2 6 6
```

**Sample Output 1**

```
2 1
1 0
2 0
```

**Explanation**

**Test case 1: **One way to obtain **2** equal integers is to set **A1 = A1 âŠ• 2 = 1 âŠ• 2 = 3**. So, the array becomes **[3, 2, 3]**. There is no way to obtain **3** equal integers in the final array.

**Test case 2:** There is no way to obtain more than one equal integer.

**Solution – XOR Equal**

**C++**

**Python**

**Java**

**Disclaimer: **The above Problem **(XOR Equal)** is generated by **CodeChef** but the Solution is Provided by **CodingBroz**. This tutorial is only for **Educational** and **Learning** Purpose.