You are given two nums1 and nums2 of the same length, along with an integer x.
In each second, you perform the following steps:
For every index i, the value of nums1[i] is incremented by nums2[i].
After the increment, you can select at most one index i and set nums1[i] to
Return the minimum number of seconds needed to make the sum of all elements in nums1 less than or equal to x. If it is impossible to do so, return
Constraints:
nums1.length
nums1[i]
nums2[i]
nums1.length nums2.length
x
You are given two nums1 and nums2 of the same length, along with an integer x.
In each second, you perform the following steps:
For every index i, the value of nums1[i] is incremented by nums2[i].
After the increment, you can select at most one index i and set nums1[i] to
Return the minimum number of seconds needed to make the sum of all elements in nums1 less than or equal to x. If it is impossible to do so, return
Constraints:
nums1.length
nums1[i]
nums2[i]
nums1.length nums2.length
x