#C10605. Student Height Classification
Student Height Classification
Student Height Classification
You are given data sets representing the heights of students. For each dataset, classify each student into one of three categories based on their height:
- Short: if \( h < 150 \)
- Average: if \(150 \leq h \leq 170\)
- Tall: if \( h > 170 \)
Your task is to process multiple datasets and, for each one, output the number of students in the Short, Average, and Tall categories respectively.
The input will be given via standard input and the output via standard output.
inputFormat
The first line contains an integer \(T\), representing the number of datasets.
For each dataset, the first line contains an integer \(n\), denoting the number of students. The next line contains \(n\) space-separated integers representing the heights of the students.
Example:
2 3 145 160 175 4 135 150 165 180
outputFormat
For each dataset, output a single line with three space-separated integers representing the counts of Short, Average, and Tall students, in that order.
Example:
1 1 1 1 2 1## sample
2
3
145 160 175
4
135 150 165 180
1 1 1
1 2 1
</p>