CF2259B Minus Two

Description

You are given an array $ a_1, a_2, \ldots, a_n $ . You may perform the following operation: - For all indices $ i $ ( $ 1 \leq i \leq n $ ), set $ a_i = |a_i - 2| $ . Find the maximum possible frequency of any integer in $ a $ after performing the operation an arbitrary number (possibly zero) of times.

Input Format

The first line of each input contains an integer $ t $ ( $ 1 \leq t \leq 10^4 $ ) — the number of test cases. The first line of each test case contains an integer $ n $ ( $ 1 \leq n \leq 2 \cdot 10^5 $ ) — the length of $ a $ . The second line of each test case contains $ n $ integers $ a_1, a_2, \ldots, a_n $ ( $ 1 \leq a_i \leq 10^9 $ ) — the array $ a $ . It is guaranteed that the sum of $ n $ over all test cases does not exceed $ 2 \cdot 10^5 $ .

Output Format

For each test case, output a single integer denoting the maximum possible frequency of any integer in $ a $ after performing the operation an arbitrary number of times.

Explanation/Hint

In the first test case, we can perform the operation once to have $ a = [|1 - 2|, |3 - 2|] = [1, 1] $ , which means the maximum possible frequency of any integer in $ a $ is $ 2 $ . In the second test case, the maximum frequency of an integer in $ a $ is $ 3 $ . It can be shown that, no matter how many operations we perform, the maximum possible frequency of an integer in $ a $ will never exceed $ 3 $ .