mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-02 22:13:28 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>公司有编号为 <code>1</code> 到 <code>n</code> 的 <code>n</code> 个工程师,给你两个数组 <code>speed</code> 和 <code>efficiency</code> ,其中 <code>speed[i]</code> 和 <code>efficiency[i]</code> 分别代表第 <code>i</code> 位工程师的速度和效率。请你返回由最多 <code>k</code> 个工程师组成的 <strong>最大团队表现值</strong> ,由于答案可能很大,请你返回结果对 <code>10^9 + 7</code> 取余后的结果。</p>\n\n<p><strong>团队表现值</strong> 的定义为:一个团队中「所有工程师速度的和」乘以他们「效率值中的最小值」。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre><strong>输入:</strong>n = 6, speed = [2,10,3,1,5,8], efficiency = [5,4,3,9,7,2], k = 2\n<strong>输出:</strong>60\n<strong>解释:</strong>\n我们选择工程师 2(speed=10 且 efficiency=4)和工程师 5(speed=5 且 efficiency=7)。他们的团队表现值为 performance = (10 + 5) * min(4, 7) = 60 。\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre><strong>输入:</strong>n = 6, speed = [2,10,3,1,5,8], efficiency = [5,4,3,9,7,2], k = 3\n<strong>输出:</strong>68\n<strong>解释:\n</strong>此示例与第一个示例相同,除了 k = 3 。我们可以选择工程师 1 ,工程师 2 和工程师 5 得到最大的团队表现值。表现值为 performance = (2 + 10 + 5) * min(5, 4, 7) = 68 。\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre><strong>输入:</strong>n = 6, speed = [2,10,3,1,5,8], efficiency = [5,4,3,9,7,2], k = 4\n<strong>输出:</strong>72\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= n <= 10^5</code></li>\n\t<li><code>speed.length == n</code></li>\n\t<li><code>efficiency.length == n</code></li>\n\t<li><code>1 <= speed[i] <= 10^5</code></li>\n\t<li><code>1 <= efficiency[i] <= 10^8</code></li>\n\t<li><code>1 <= k <= n</code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Hard",
|
||||
"likes": 103,
|
||||
"likes": 104,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -155,7 +155,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"5.1K\", \"totalSubmission\": \"15.4K\", \"totalAcceptedRaw\": 5076, \"totalSubmissionRaw\": 15444, \"acRate\": \"32.9%\"}",
|
||||
"stats": "{\"totalAccepted\": \"5.2K\", \"totalSubmission\": \"15.7K\", \"totalAcceptedRaw\": 5185, \"totalSubmissionRaw\": 15689, \"acRate\": \"33.0%\"}",
|
||||
"hints": [
|
||||
"Keep track of the engineers by their efficiency in decreasing order.",
|
||||
"Starting from one engineer, to build a team, it suffices to bring K-1 more engineers who have higher efficiencies as well as high speeds."
|
||||
|
Reference in New Issue
Block a user