아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

apt upgrade

시간 제한1초메모리 제한1024 MB

요약
n개 패키지 크기와 완료된 m개, 병렬 슬롯 k개가 주어질 때 진행률이 가질 수 있는 최댓값을 구한다.
난이도

보통10점 중 6점

유형
그리디, 정렬, 수학
정답자
아직 제출이 없습니다

문제

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 100100\\% done, but not yet finished.

입력

The input consists of:

  • One line with three integers nn, mm, and kk (1≤n≤1051\leq n\leq 10^5, 0≤m≤n0\leq m\leq n, 1≤k≤101\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 (1≤s≤1091\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−410^{-4}.

예제2

  1. 예제 1

    입력
    5 1 2
    10 25 30 15 20
    
    예상 출력
    75
    
  2. 예제 2

    입력
    5 0 4
    4 2 7 1 3
    
    예상 출력
    94.117647059