TOO EASY Cookie Run

아직 제출이 없습니다시간 제한2초메모리 제한1024 MB

문제

Cookie Run game is a popular game in which the cookie character runs through a map consisting of N stages to score points. 

Soo Young, the map designer for Cookie Run, was preparing a new map patch for Children's Day. After working hard to create an attractive map and testing it for the last time the day before the patch, she suddenly realized that the map was designed to be too easy!

The map design of the cookie run game consists of the following rules. 

  • Each stage is given a difficulty level of A_0,A_1,A_2,...,A_N1A\_0, A\_1, A\_2, ..., A\_{N-1}, and the higher the difficulty is, the more difficult it is to pass the corresponding stage.
  • If the sum of the difficulty levels of consecutive stages is greater than or equal to MM, we call this section as interesting section. That is, if A_i+A_i+1+...+A_jMA\_i + A\_{i+1} + ... + A\_j \geq M, section (i,j)(i, j) is an interesting section.
  • Maps should always have at least KK interesting section.

In other words, the following conditions should be satisfied:

  • Let TT be the number of pairs (i,j)(i, j) satisfying the following conditions:

    • 0ijN10 \le i \le j \le N-1
    • A_i+A_i+1+...+A_jMA\_{i} + A\_{i+1} + ... + A\_{j} \ge M.
  • Then, TKT \ge K for the given integer KK.

To solve this problem, Soo Young requested help from KAIST RUN Spring Contest participants.

Since there is not much time left until the patch release, all Soo Young can do is add difficulty XX to all stages at once to make it more difficult. 

Your job is to find the smallest non-negative integer XX that satisfies these conditions.

입력

The first line contains three space-separated integers, NN, MM, and KK.

The second line contains NN space-separated integers A_0,A_1,,A_N1A\_{0}, A\_{1}, \cdots, A\_{N-1}.

출력

Print a single non-negative integer denoting the smallest possible XX.

You can assume that at least one non-negative integer XX exists, satisfying the given conditions.

제한

  • 1N100,0001 \le N \le 100\\,000
  • 1M10181 \le M\le 10^{18}
  • 1KN(N+1)21 \le K \le \frac{N (N+1)}{2}
  • 0A_i1090 \le A\_{i} \le 10^9 (0iN1)(0 \le i \le N-1)