#P1720D1. Xor-Subsequence (easy version)
Xor-Subsequence (easy version)
Description
It is the easy version of the problem. The only difference is that in this version .
You are given an array of integers . Bryap wants to find the longest beautiful subsequence in the array.
An array , where , is a subsequence of length of the array .
Subsequence of length is called beautiful, if the following condition holds:
- For any () holds: .
Here denotes the bitwise XOR of and . For example, and .
Bryap is a simple person so he only wants to know the length of the longest such subsequence. Help Bryap and find the answer to his question.
The first line contains a single integer () — the number of test cases. The description of the test cases follows.
The first line of each test case contains a single integer () — the length of the array.
The second line of each test case contains integers () — the elements of the array.
It is guaranteed that the sum of over all test cases does not exceed .
For each test case print a single integer — the length of the longest beautiful subsequence.
Input
The first line contains a single integer () — the number of test cases. The description of the test cases follows.
The first line of each test case contains a single integer () — the length of the array.
The second line of each test case contains integers () — the elements of the array.
It is guaranteed that the sum of over all test cases does not exceed .
Output
For each test case print a single integer — the length of the longest beautiful subsequence.
Note
In the first test case, we can pick the whole array as a beautiful subsequence because .
In the second test case, we can pick elements with indexes , and (in -indexation). For this elements holds: and .