---
{"category_name":"school","problem_code":"AVGFLEX","problem_name":"Average Flex","problemComponents":{"constraints":"- $1 \\leq T \\leq 1000$\n- $1 \\leq N \\leq 100$\n- $0 \\leq A_i \\leq 100$\n","constraintsState":true,"subtasks":"- 30 points : $1 \\leq R \\leq 10000$\n- 70 points : $1 \\leq R \\leq 10^9$\n","subtasksState":false,"inputFormat":"- The first line contains $T$ - the number of test cases. Then the test cases follow.\n- The first line of each test case contains a single integer $N$ - the number of students.\n- The second line of each test case contains $N$ integers $A_1, A_2, \\dots, A_N$ - the scores of the students.\n","inputFormatState":true,"outputFormat":"For each test case, output in a single line the number of students who will boast.\n","outputFormatState":true,"sampleTestCases":{"0":{"id":1,"input":"3\n3\n100 100 100\n3\n2 1 3\n4\n30 1 30 30\n","output":"3\n2\n3\n","explanation":"- **Test case $1$:** All three students got the highest score. So all three of them will boast.\n- **Test case $2$:** Only the student with score $1$ will not be able to boast. \n- **Test case $3$:** Only the student with score $1$ will not be able to boast.","isDeleted":false}}},"video_editorial_url":"https://youtu.be/C1hq9s1UppE","languages_supported":{"0":"CPP14","1":"C","2":"JAVA","3":"PYTH 3.6","4":"CPP17","5":"PYTH","6":"PYP3","7":"CS2","8":"ADA","9":"PYPY","10":"TEXT","11":"PAS fpc","12":"NODEJS","13":"RUBY","14":"PHP","15":"GO","16":"HASK","17":"TCL","18":"PERL","19":"SCALA","20":"LUA","21":"kotlin","22":"BASH","23":"JS","24":"LISP sbcl","25":"rust","26":"PAS gpc","27":"BF","28":"CLOJ","29":"R","30":"D","31":"CAML","32":"FORT","33":"ASM","34":"swift","35":"FS","36":"WSPC","37":"LISP clisp","38":"SQL","39":"SCM guile","40":"PERL6","41":"ERL","42":"CLPS","43":"ICK","44":"NICE","45":"PRLG","46":"ICON","47":"COB","48":"SCM chicken","49":"PIKE","50":"SCM qobi","51":"ST","52":"SQLQ","53":"NEM"},"max_timelimit":0.5,"source_sizelimit":50000,"problem_author":"jeevanjyot","problem_tester":"","date_added":"20-10-2021","tags":{"0":"cakewalk","1":"cook134","2":"jeevanjyot","3":"sorting"},"problem_difficulty_level":"Unavailable","best_tag":"","editorial_url":"https://discuss.codechef.com/problems/AVGFLEX","time":{"view_start_date":1635100202,"submit_start_date":1635100202,"visible_start_date":1635100202,"end_date":1735669800},"is_direct_submittable":false,"problemDiscussURL":"https://discuss.codechef.com/search?q=AVGFLEX","is_proctored":false,"visitedContests":{},"layout":"problem"}
---
### Read problem statements in [Mandarin](https://www.codechef.com/download/translated/COOK134/mandarin/AVGFLEX.pdf), [Bengali](https://www.codechef.com/download/translated/COOK134/bengali/AVGFLEX.pdf), and [Russian](https://www.codechef.com/download/translated/COOK134/russian/AVGFLEX.pdf) as well.
There are $N$ students in a class, where the $i$-th student has a score of $A_i$.
The $i$-th student will *boast* if and only if the number of students scoring less than or equal $A_i$ is greater than the number of students scoring greater than $A_i$.
Find the number of students who will boast.
<aside style='background: #f8f8f8;padding: 10px 15px;'><div>All submissions for this problem are available.</div></aside>