The Space Exams
All submissions for this problem are available.It is time for the annual space exams. There are $N$ people who are going to give each of $M$ different exams during the annual space exams. You are observing the exam results closely as you want to form the ultimate galactic patrol. You want to select only $above$ $average$ candidates for your galactic patrol. A candidate is considered above average if the candidate achieves an above-average score in at least one of the exams. You have to find out the total number of eligible candidates for your galactic patrol. ###Input: - First line will contain $T$, number of testcases. Then the testcases follow. - Each testcase contains two integers $N, M$. - Followed by M lines containing N integers ith of which denotes the score of the ith person for that exam. ###Output: For each testcase, output in a single line the number of eligible candidates for you galactic patrol. ###Constraints - $1 \leq T \leq 1000$ - $1 \leq N\leq 100$ - $1 \leq M\leq 10$ - $0 \leq Marks[i]\leq 100$ ###Sample Input: 1 2 2 3 2 2 3 ###Sample Output: 2 ###EXPLANATION: The average for the test1 is 2.5, only candidate 1 is above average in test1. The average for the test2 is 2.5, only candidate 2 is above average in test2. So 2 candidates are above average in total.
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, rust, SCALA, swift, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, SQL, kotlin, PERL6, TEXT, SCM chicken, PYP3, CLOJ, R, COB, FS|
Fetching successful submissions
If you are still having problems, see a sample solution here.