시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
8 초 (추가 시간 없음) | 1024 MB | 127 | 29 | 27 | 30.682% |
As a student of the Biology And Probability Course at your university, you have just performed an experiment as part of the practical assignments. However, your results do not look very nice: you had hoped that the average of your samples would be different from what it is now.
To improve your results, you decide to let some of your samples "magically disappear" (i.e., dump them in the waste bin). In order to not raise suspicion with your teacher, you can remove only a few of your samples. How close can you possibly get to your desired average?
The input consists of:
Output the minimal absolute difference between $\overline{x}$ and the average you can obtain by removing at most $k$ samples from the dataset.
Your answer should have an absolute error of at most $10^{-4}$.
5 2 2 1 2 3 100 200
0
5 4 -5 -6 -3 0 6 3
0.5
ICPC > Regionals > Europe > Northwestern European Regional Contest > Benelux Algorithm Programming Contest > BAPC 2022 A번