Company: Air India
Difficulty: medium
Bandwidth Distribution There are `n` APIs. API `i` requires exactly `bandwidth[i]` units of bandwidth to run and can serve `request[i]` requests when selected. Given the available total bandwidth, select APIs whose total bandwidth does not exceed it and maximize the number of served requests. Input The first line contains `n`. The second line contains `n` bandwidth values. The third line contains `n` request values. The fourth line contains the total available bandwidth. Output Print the maximum number of requests that can be served. Constraints `1 <= n <= 100`, `1 <= total_bandwidth <= 10^5`, `1 <= bandwidth[i] <= 10^5`, and `1 <= request[i] <= 10^9`. Example Input `5` `200 100 350 50 100` `270 142 450 124 189` `500` Output `763` Notes Each selected API is either fully selected or not selected; partial bandwidth allocation is not allowed.