#AGC041B. [AGC041B] Voting Judges

[AGC041B] Voting Judges

Score : 700700 points

Problem Statement

NN problems are proposed for an upcoming contest. Problem ii has an initial integer score of AiA_i points.

MM judges are about to vote for problems they like. Each judge will choose exactly VV problems, independently from the other judges, and increase the score of each chosen problem by 11.

After all MM judges cast their vote, the problems will be sorted in non-increasing order of score, and the first PP problems will be chosen for the problemset. Problems with the same score can be ordered arbitrarily, this order is decided by the chief judge.

How many problems out of the given NN have a chance to be chosen for the problemset?

Constraints

  • 2N1052 \le N \le 10^5
  • 1M1091 \le M \le 10^9
  • 1VN11 \le V \le N - 1
  • 1PN11 \le P \le N - 1
  • 0Ai1090 \le A_i \le 10^9

Input

Input is given from Standard Input in the following format:

NN MM VV PP

A1A_1 A2A_2 ...... ANA_N

Output

Print the number of problems that have a chance to be chosen for the problemset.

6 1 2 2
2 1 1 3 0 2
5

If the only judge votes for problems 22 and 55, the scores will be 22 22 11 33 11 22. The problemset will consist of problem 44 and one of problems 11, 22, or 66.

If the only judge votes for problems 33 and 44, the scores will be 22 11 22 44 00 22. The problemset will consist of problem 44 and one of problems 11, 33, or 66.

Thus, problems 11, 22, 33, 44, and 66 have a chance to be chosen for the problemset. On the contrary, there is no way for problem 55 to be chosen.

6 1 5 2
2 1 1 3 0 2
3

Only problems 11, 44, and 66 have a chance to be chosen.

10 4 8 5
7 2 3 6 1 6 5 4 6 5
8