Logo
(追記) (追記ここまで)

21146번 - Rating Problems 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 512 MB44637935285.437%

문제

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:

  • 3ドル$ means: I really like this problem!
  • $-3$ means: I really don’t like this problem!
  • 0ドル$ means: Meh. I don’t care if we use this problem or not.

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}$.

제한

예제 입력 1

5 2
1
2

예제 출력 1

-1.2 2.4

예제 입력 2

4 4
-3
-3
-2
-3

예제 출력 2

-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번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /