#P10389. [蓝桥杯 2024 省 A] 成绩统计
[蓝桥杯 2024 省 A] 成绩统计
Problem Description
There are students in Xiao Lan's class. After an exam, Xiao Lan wants to analyze the students' scores. The score of the -th student is . After Xiao Lan has checked the scores of the first students, he can choose any students from and compute the variance of these scores. What is the minimum number of students' scores Xiao Lan must check so that it is possible to choose students whose variance is less than a given value ?
Hint: The variance of numbers is defined as , where is the average of , .
Input Format
The first line contains three positive integers , separated by one space.
The second line contains positive integers , separated by one space.
Output Format
Output one line containing one integer, the answer. If the condition cannot be satisfied, output .
5 3 1
3 2 5 2 3
4
Hint
After checking the scores of the first three students, you can only choose , and the variance is .
After checking the scores of the first four students, you can choose , and the variance is , so the answer is .
Constraints:
For of the testdata, .
For of the testdata, .
For all testdata, , , .
Translated by ChatGPT 5