#C8897. Students Above Threshold
Students Above Threshold
Students Above Threshold
You are given a list of student records. Each record contains a student's name and a list of their scores. Your task is to print the names of students whose average score is strictly greater than a given threshold. The average score for a student is computed as $$\frac{\text{sum of scores}}{\text{number of scores}}$$. If a student has no scores, they should be skipped. The output should list the qualifying student names in the same order as they appear in the input, separated by a single space. If no student qualifies, print an empty line.
inputFormat
The input is read from standard input (stdin) and has the following format:
Line 1: An integer n, representing the number of students.
The next n lines: Each line represents a student. Each line starts with the student's name (a string without spaces), followed by an integer m which indicates the number of scores, followed by m integers representing the scores.
The last line: An integer threshold.
outputFormat
Print a single line to standard output (stdout) containing the names of students whose average score is greater than the threshold, separated by a single space. If no student qualifies, output an empty line.## sample
3
Alice 3 90 80 85
Bob 3 70 75 72
Charlie 3 95 85 92
80
Alice Charlie