포럼
문제 ICPC00346

A. apt upgrade

스페셜 저지 — 출력을 사용자 정의 프로그램으로 검사하므로 여러 정답이 인정될 수 있습니다.
설명

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
출력
75
예제 2
입력
5 0 4
4 2 7 1 3
출력
94.117647059
문제 정보

생성자가 기록되지 않았습니다.

출처 ICPC BAPC 2023

평가 및 의견

A. apt upgrade

개요
출제자 난이도 Unrated 레이팅 미적용 의견 0 / 1 공개 집계 (커뮤니티 난이도, 주요 주제, 품질)는 의견이 충분히 모이면 공개됩니다.

Log in to rate problems.

개별 의견

아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.

풀이 제출

A. apt upgrade

게스트로 둘러보고 있습니다. 로그인하면 풀이를 제출하고 진행 상황을 확인할 수 있습니다. 로그인하고 제출하기
공개
C++20 Tab 들여쓰기 · Ctrl+/ 주석 토글 · Enter 자동 들여쓰기
1 1 1 0 공백: 4 · UTF-8