#C6826. Consistent Employees
Consistent Employees
Consistent Employees
In this problem, you are given ( T ) test cases. For each test case, you are provided with the number of employees ( N ) and the number of days in the month ( M ). You are also given a threshold score ( TH ). For each employee, there is a list of ( M ) daily scores. Your task is to determine the number of employees in each test case whose daily scores are strictly greater than ( TH ) on every day of the month.
Formally, for each test case, count the number of employees for which for every day ( i ) (where ( 1 \leq i \leq M )), the score ( s_i ) satisfies ( s_i > TH ).
inputFormat
The input is read from standard input (stdin).
The first line contains an integer ( T ) representing the number of test cases.
For each test case, the input format is as follows:
1. A line with two space-separated integers ( N ) and ( M ), where ( N ) is the number of employees and ( M ) is the number of days in the month.
2. A line containing an integer ( TH ), the threshold score.
3. ( N ) lines follow, each containing ( M ) space-separated integers representing the scores for each day for that employee.
outputFormat
For each test case, output a single line containing one integer --- the number of employees who have scored strictly greater than ( TH ) on every day of the month. The outputs for different test cases should be printed on separate lines.## sample
3
3 4
10
12 15 16 18
11 10 9 20
13 14 12 11
2 5
20
22 25 21 23 20
19 22 25 30 21
1 3
5
6 7 8
2
0
1
</p>