Get Minimal Cost
Howdy, amazing user friends! This problem was identified as a duplicate of Selling Shoes. However, after serious consideration, I decided not to merge duplicates for now as both of them have received code submissions. I will figure an approach to handle a situation like this in the future. Thank you for your understanding! All your hard working will eventually be rewarded in a way you expect! 🧡
An online retailer offers products in n different dimensions as specified in the array dimensions. The category supervisor notices that several dimensions are redundant and do not offer a favorable customer experience. To optimize the available stock, the product should be offered in unique dimensions. The dimension of the i-th product, dimensions[i], can be augmented by one unit for a fee given in the adjustmentCosts array, adjustmentCosts[i].
Determine the minimal total fee required to ensure that all product dimensions are unique.
1Example 1
2Example 2
3Example 3
Constraints
Limits and guarantees your solution can rely on.
1 ≤ n ≤ 2 * 10^51 ≤ size[i] ≤ 10^91 ≤ cost[i] ≤ 10^4