A ride-sharing company has n electric scooters available for a new rental service. You are given two 0-indexed integer arrays, startCosts and chargeCosts, both of length n. The ith scooter requires startCosts[i] units of battery charge to start and consumes chargeCosts[i] units of battery per kilometer traveled. You are also given an integer batteryLimit representing the maximum available battery charge for the operation.
When using a consecutive segment of k scooters, the total battery consumption is calculated as max(startCosts)+k×∑(chargeCosts), where max(startCosts) is the highest startup charge among the k scooters and ∑(chargeCosts) is the total battery consumption of all k scooters per kilometer.
Return the maximum number of consecutive scooters you can deploy such that the total battery consumption does not exceed batteryLimit.
Input Format:
The first line of input contains three integers n(1≤n≤105) denoting the size of startCosts and chargeCosts and b(1≤b≤1015) denoting batteryLimit.
The second line contains n integers s1,s2,…,sn representing startCosts. (1≤si≤105)
The third line contains n integers c1,c2,…,cn representing chargeCosts. (1≤ci≤105)