시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 512 MB | 68 | 57 | 53 | 85.484% |
Your judges are preparing a problem set, and they’re trying to evaluate a problem for inclusion in the set. Each judge rates the problem with an integer between $-3$ and $3$, where:
The overall rating of the problem is the average of all of the judges’ ratings—that is, the sum of the ratings divided by the number of judges providing a rating.
Some judges have already rated the problem. Compute the minimum and maximum possible overall rating that the problem can end up with after the other judges submit their ratings.
The first line of input contains two integers $n$ ($1 \le n \le 10$) and $k$ ($0 \le k \le n$), where $n$ is the total number of judges, and $k$ is the number of judges who have already rated the problem.
Each of the next $k$ lines contains a single integer $r$ ($-3 \le r \le 3$). These are the ratings of the $k$ judges that have already rated the problem.
Output two space-separated floating point numbers on a single line, which are the minimum and maximum overall rating the problem could achieve after the remaining judges rate the problem, minimum first. These values must be accurate to an absolute or relative error of $10^{-4}$.
5 2 1 2
-1.2 2.4
4 4 -3 -3 -2 -3
-2.75 -2.75
ICPC > Regionals > North America > Southeast USA Regional > 2020 Southeast USA Regional Programming Contest M번
ICPC > Regionals > North America > Mid-Central Regional > 2020 Mid-Central Regional Programming Contest F번
ICPC > Regionals > North America > Pacific Northwest Regional > 2020 ICPC Pacific Northwest Region Division 2 AB번
ICPC > Regionals > North America > Mid-Atlantic Regional > 2020 Mid-Atlantic USA Regional Contest A번
ICPC > Regionals > North America > South Central USA Regional > 2020 South Central USA Regional Contest M번