#P1478A. Nezzar and Colorful Balls
Nezzar and Colorful Balls
Description
Nezzar has balls, numbered with integers . Numbers are written on them, respectively. Numbers on those balls form a non-decreasing sequence, which means that for all .
Nezzar wants to color the balls using the minimum number of colors, such that the following holds.
- For any color, numbers on balls will form a strictly increasing sequence if he keeps balls with this chosen color and discards all other balls.
Note that a sequence with the length at most is considered as a strictly increasing sequence.
Please help Nezzar determine the minimum number of colors.
The first line contains a single integer () — the number of testcases.
The first line of each test case contains a single integer ().
The second line of each test case contains integers (). It is guaranteed that .
For each test case, output the minimum number of colors Nezzar can use.
Input
The first line contains a single integer () — the number of testcases.
The first line of each test case contains a single integer ().
The second line of each test case contains integers (). It is guaranteed that .
Output
For each test case, output the minimum number of colors Nezzar can use.
Note
Let's match each color with some numbers. Then:
In the first test case, one optimal color assignment is .
In the second test case, one optimal color assignment is .