← 返回 amazon 的题目列表Maximize Fully Filled Positions Within Budget Constraints
类型:online_judge
amazon
Given two arrays A and B of the same length, where A is the current array and B is the cap array, for each position i in A, you can fill A[i] up to B[i] with a total additional budget X. How many positions can be maximally filled under these conditions? For example, with A = [1, 2, 3] and B = [4, 5, 6], total budget X = 5, calculate the maximum number of positions that can be filled to their maximum in B.
Example
Input
1,2,3
4,5,6
5