• # For Solution

There are NN students in a class, where the ii-th student has a score of AiAi.

The ii-th student will boast if and only if the number of students scoring less than or equal AiAi is greater than the number of students scoring greater than AiAi.

Find the number of students who will boast.

## Average Flex solution codechef

• The first line contains TT – the number of test cases. Then the test cases follow.
• The first line of each test case contains a single integer NN – the number of students.
• The second line of each test case contains NN integers A1,A2,,ANA1,A2,…,AN – the scores of the students.

## Average Flex solution codechef

For each test case, output in a single line the number of students who will boast.

## Average Flex solution codechef

• 1T10001≤T≤1000
• 1N1001≤N≤100
• 0Ai1000≤Ai≤100

3
3
100 100 100
3
2 1 3
4
30 1 30 30

## Average Flex solution codechef

3
2
3

### Explanation

• Test case 11: All three students got the highest score. So all three of them will boast.
• Test case 22: Only the student with score 11 will not be able to boast.
• Test case 33: Only the student with score 11 will not be able to boast