#C12762. Readers Above Threshold
Readers Above Threshold
Readers Above Threshold
You are given the monthly reading statistics of several readers. In each month, you are provided with the number of books each reader read. Your task is to determine, for each month, the indices (0-indexed) of the readers who read more than k books.
The input starts with an integer representing the number of months. For each month, the first number indicates the number of readers for that month, followed by that many integers representing the number of books each reader read. After all months' data, an integer k is given as the threshold.
Note: If no reader exceeds the threshold in a month, output an empty line for that month.
The relation to the threshold is mathematically given as follows:
For a month with reader counts \(a_0, a_1, \ldots, a_{n-1}\), you need to find all indices \(i\) such that \(a_i > k\).
inputFormat
The first line contains a single integer m which represents the number of months.
Each of the next m lines begins with an integer n — the number of readers in that month, followed by n space-separated integers representing the number of books read by each reader in that month.
The last line contains a single integer k, the threshold.
outputFormat
For each month, output a line containing the indices (0-indexed) of the readers who read more than k books, separated by a single space. If no reader exceeds the threshold in a month, output an empty line for that month.
## sample2
2 6 7
2 8 9
5
0 1
0 1
</p>