You are given two integer arrays nums1 and nums2, both of length n, and two integers k1 and k2.
You may choose any element in nums1 and increment or decrement it by k1 times in total. Similarly, you may choose any element in nums2 and increment or decrement it by k2 times in total.
Return the minimum possible sum of squared differences between corresponding elements of nums1 and nums2, which is defined as k1 modifications to nums1 and at most k2 modifications to nums2.
Constraints:
n nums1.length nums2.length
n
nums1[i], nums2[i]
k1, k2
You are given two integer arrays nums1 and nums2, both of length n, and two integers k1 and k2.
You may choose any element in nums1 and increment or decrement it by k1 times in total. Similarly, you may choose any element in nums2 and increment or decrement it by k2 times in total.
Return the minimum possible sum of squared differences between corresponding elements of nums1 and nums2, which is defined as k1 modifications to nums1 and at most k2 modifications to nums2.
Constraints:
n nums1.length nums2.length
n
nums1[i], nums2[i]
k1, k2