[LeetCode] 857. Minimum Cost to Hire K Workers 雇佣K名工人的
Now we want to hire exactly?
Return the least amount of money needed to form a paid group satisfying the above conditions. Example 1: Input: quality = [10,20,5],wage = [70,50,30],K = 2 Output: 105.00000 Explanation: We pay 70 to 0-th worker and 35 to 2-th worker. Example 2: Input: quality = [3,1,10,1],wage = [4,8,2,7],K = 3 Output: 30.66667 Explanation: We pay 4 to 0-th worker,13.33333 to 2-th and 3-th workers seperately. Note:
https://github.com/grandyang/leetcode/issues/857
https://leetcode.com/problems/minimum-cost-to-hire-k-workers/
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |