Company: IBM
Difficulty: medium
Problem Title: Test Optimization A student is taking a test on n different subjects. For each i th subject, they have already answered answered[i] questions and have time to answer a total of q more questions overall. For each i th subject, the number of questions answered has to be at least needed[i] in order to pass. Determine the maximum number of subjects the student can pass if the q additional answers are optimally distributed among the subjects. Input Format The first line contains two integers n and q , where: n is the number of subjects. q is the number of additional questions the student can answer. The second line contains n space-separated integers representing needed[i] . The third line contains n space-separated integers representing answered[i] . Output Format Print a single integer representing the maximum number of subjects the student can pass. Constraints 1 ≤ n ≤ 100 0 ≤ q ≤ 1000 0 ≤ needed[i], answered[i] ≤ 100 Examples Input: 2 1 4 5 2 4 Output: 1 In this example,