Costly Contest

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

문제

The company Mindsight is holding a programming contest for nn contestants of varying ages. It has been decided that the contest will be separated into kk age divisions. The duration of the contest will be tt minutes, the same for all divisions. Mindsight has created a pool of mm available problems for use in the contest, and since all divisions will compete at the same time, the same problems can be used in multiple divisions without any issues.

In each division, the participant that solves the largest number of problems gets a prize, and in case of a tie (same number of problems solved) everyone tied for first place gets a prize. In particular, if no one in a division solves any problems, then everyone in that division gets a prize.

Mindsight has now come to the horrible realization that with these rules it is possible that all participants win a prize. This could bankrupt the company! So the company has enlisted a team of experts to help resolve the situation.

The expert group analyzed the data in depth. For each of the nn participants, their skill level was quantified: for the ii'th participant, a slowness factor s_is\_i was determined. Then, for each of the mm problems available, its difficulty was quantified: for the jj'th problem, a difficulty rating d_jd\_j was assigned. The experts predict that the time it takes for participant ii to solve problem jj is s_id_js\_i \cdot d\_j minutes. Furthermore participants cannot work on multiple problems in parallel so the time it takes to solve multiple problem is the sum of times of solving the individual problems. It is also well-established that participants always solve problems in increasing order of difficulty, starting with the easiest problem.

Now it is up to you, the underpaid intern, to configure the divisions so as to minimize the number of awarded prizes.  Your task is to partition the nn participants into kk non-empty age divisions, and for each age division choose a non-empty subset of the mm available problems to use in that division.  Each division must correspond to a contiguous age range of participants (e.g. a division cannot be "2020-2525 or 3030-3535 years old"). Recall that the same problem may be used in multiple divisions.

입력

The first line of input contains four integers nn, mm, kk, tt (1n1051 \leq n \leq 10^5, 1m1001 \leq m \leq 100, 1kn1 \leq k \leq n, 1t1051 \leq t \leq 10^5) -- the number of participants nn, the number of available problems mm, the number of age divisions kk, and the duration of the contest tt. The second line contains nn integers s_1,,s_ns\_1, \ldots, s\_n the slowness factors of the participants (1s_i1051 \leq s\_i \leq 10^5). The participants are ordered by age, and you can assume no two participants have the same exact age. The third line contains mm integers d_1,,d_md\_1, \ldots, d\_m the difficulty ratings of the problems (1d_j1051 \leq d\_j \leq 10^5).

출력

Output a single integer, the minimum number of prize winners.