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

30489번 - apt upgrade 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 1024 MB19211710860.674%

문제

You are using your favourite program, the BAPC ArchLinux Package Configurator, to upgrade your system. There are $n$ outdated packages that will be upgraded, and your package manager is kind enough to inform you of the download size for each package up front. Due to recent advances in parallelism, it downloads up to $k$ packages in parallel, although you do not know the order in which they are downloaded.

You are now looking at the download progress bar in the console, and observe that only $m$ packages have currently finished downloading but the overall download progress is already very high. This does not seem to make sense! You wonder: what is the maximum overall percentage of the total download size that could be done with this many package downloads completed? Note that there is a small duration of time in which a package that is being downloaded is reported as 100ドル\%$ done, but not yet finished.

입력

The input consists of:

  • One line with three integers $n,ドル $m,ドル and $k$ (1ドル\leq n\leq 10^5,ドル 0ドル\leq m\leq n,ドル 1ドル\leq k\leq 10$), the number of packages being upgraded, the number of packages that finished downloading, and the number of packages that can be downloaded in parallel.
  • One line with $n$ integers $s$ (1ドル\leq s\leq 10^9$), the sizes of the packages being upgraded.

출력

Output the maximum possible percentage of the download that is done.

Your answer should have an absolute error of at most 10ドル^{-4}$.

제한

예제 입력 1

5 1 2
10 25 30 15 20

예제 출력 1

75

예제 입력 2

5 0 4
4 2 7 1 3

예제 출력 2

94.117647059

힌트

출처

ICPC > Regionals > Europe > Northwestern European Regional Contest > Benelux Algorithm Programming Contest > BAPC 2023 A번

  • 문제를 만든 사람: Ragnar Groot Koerkamp
(追記) (追記ここまで)

출처

대학교 대회

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

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