#K63222. Follow-Worthy Series
Follow-Worthy Series
Follow-Worthy Series
You are given a series of episodes and the days on which each episode is released. A series is considered follow-worthy if there exists at least one day on which at least \(3\) episodes are released.
Your task is to determine, for multiple test cases, whether each series is follow-worthy. In other words, check if for any given test case, there exists a day such that the number of episodes released on that day is at least \(3\).
Example: For a series with 5 episodes and release days [1, 2, 2, 2, 3], since day 2 has 3 episodes released, the output is YES
.
inputFormat
The first line of the input contains an integer T
representing the number of test cases.
For each test case, the first line contains an integer N
denoting the number of episodes, followed by a line with N
space-separated integers representing the release days of the episodes.
Input is read from standard input (stdin).
outputFormat
For each test case, output a single line containing YES
if the series is follow-worthy, or NO
otherwise.
Output should be printed to standard output (stdout).
## sample6
5
1 2 2 2 3
4
1 1 1 1
6
1 2 3 4 5 6
3
4 4 4
7
1 2 2 3 3 3 3
8
1 2 2 3 4 4 7 7
YES
YES
NO
YES
YES
NO
</p>