#P1926. 小书童——刷题大军
小书童——刷题大军
Description
Xiao A is wildly “grinding problems”, blatantly “grinding problems”. He has found kinds of “problems” he likes in Xiao Shutong, and each “problem” has a required time. The teacher has assigned homework tasks, each with its required time and score, and the teacher stipulates that points or more is passing. Xiao A has only units of time left, and he wants to “grind” as many “problems” as possible on the basis of passing.
Input Format
The first line contains four integers .
The second line has numbers, representing the required time for each “problem”.
The third line has numbers, representing the required time for each homework task.
The fourth line has numbers, representing the score of each homework task.
Output Format
A single number, representing how many “problems” Xiao A can grind.
3 4 20 100
15 20 50
10 15 40 40
5 5 10 15
2
Hint
Constraints and Agreements
For of the testdata, , , , . It is guaranteed that passing is always possible.
Translated by ChatGPT 5
京公网安备 11011102002149号