PivotOJ

apt upgrade

시간 제한: 1000ms메모리 제한: 1024MB출처: BAPC 2023BOJ 30489

문제

You are using your favourite program, the BAPC ArchLinux Package Configurator, to upgrade your system. There are nn 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 kk 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 mm 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%100\% done, but not yet finished.

입력

The input consists of:

  • One line with three integers nn, mm, and kk (1n1051\leq n\leq 10^5, 0mn0\leq m\leq n, 1k101\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 nn integers ss (1s1091\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 10410^{-4}.

예제

예제 1

입력
5 1 2
10 25 30 15 20
출력
75

예제 2

입력
5 0 4
4 2 7 1 3
출력
94.117647059
코드를 제출하려면 로그인하세요.