You are given two nums1 and nums2 of length n, and a positive integer k.
Choose a subsequence of indices of length k. The score of selecting these indices is defined as the sum of the chosen elements in nums1 multiplied by the minimum of the chosen elements in nums2.
Return the maximum possible score.
Constraints:
n nums1.length nums2.length
n
nums1[i], nums2[j]
k n
You are given two nums1 and nums2 of length n, and a positive integer k.
Choose a subsequence of indices of length k. The score of selecting these indices is defined as the sum of the chosen elements in nums1 multiplied by the minimum of the chosen elements in nums2.
Return the maximum possible score.
Constraints:
n nums1.length nums2.length
n
nums1[i], nums2[j]
k n