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

17541번 - Maratona Brasileira de Popcorn 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1.5 초 (추가 시간 없음) 512 MB92464156.164%

문제

The “Maratona Brasileira de Popcorn” is a competition that takes place annually to find out which team is the most organized, prepared and well-trained in the art of eating popcorn. It is organized by Brazilian Society of Popcorn Eaters (SBCp, its acronym in Portuguese), which periodically meets to discuss the rules and format of the competition.

The competition consists of N popcorn bags placed side by side, where each bag has an arbitrary amount of popcorn. For added fun, the competition takes place in teams, each made up of C competitors. Since the “Maratona Brasileira de Popcorn” is a serious event that values, above all, the health of the competitors, the medical commission has imposed that each competitor may eat a maximum of T popcorn per second to avoid possible sickness.

At its last meeting, SBCp defined two new rules for the 2019 edition:

  • Each team competitor must eat a contiguous sequence of popcorn bags. It is perfectly valid that a competitor does not eat any popcorn.
  • All popcorn in the same bag must be eaten by a single competitor.

The goal of the competition is to eat all the popcorn in the shortest possible time as the C competitors can eat in parallel and they will abide by all rules imposed by the SBCp.

입력

The first line of input contains three integer numbers N, C, T (1 ≤ N ≤ 105, 1 ≤ C ≤ 105 and 1 ≤ T ≤ 50), representing the number of popcorn bags in the competition, the number of competitors in the team, and the maximum amount of popcorn per second a competitor can eat. The second line contains N integers Pi (1 ≤ Pi ≤ 104), representing the amount of popcorn on each of the N popcorn bags.

출력

Your program must output a single line, containing an integer number, representing The minimum amount of seconds it takes for the team to eat all the popcorn if they organize themselves as best possible.

제한

예제 입력 1

5 3 4
5 8 3 10 7

예제 출력 1

4

예제 입력 2

3 2 1
1 5 1

예제 출력 2

6

예제 입력 3

3 2 1
1 1 5

예제 출력 3

5

힌트

출처

ICPC > Regionals > Latin America > Sub-Regional Brasil do ACM ICPC > Maratona de Programação SBC 2019 M번

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

출처

대학교 대회

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

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