mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-08 08:51:42 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给定数组<meta charset=\"UTF-8\" /> <code>people</code> 。<code>people[i]</code>表示第 <code>i</code><sup> </sup>个人的体重 ,<strong>船的数量不限</strong>,每艘船可以承载的最大重量为 <code>limit</code>。</p>\n\n<p>每艘船最多可同时载两人,但条件是这些人的重量之和最多为 <code>limit</code>。</p>\n\n<p>返回 <em>承载所有人所需的最小船数</em> 。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong>people = [1,2], limit = 3\n<strong>输出:</strong>1\n<strong>解释:</strong>1 艘船载 (1, 2)\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong>people = [3,2,2,1], limit = 3\n<strong>输出:</strong>3\n<strong>解释:</strong>3 艘船分别载 (1, 2), (2) 和 (3)\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre>\n<strong>输入:</strong>people = [3,5,3,4], limit = 5\n<strong>输出:</strong>4\n<strong>解释:</strong>4 艘船分别载 (3), (3), (4), (5)</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= people.length <= 5 * 10<sup>4</sup></code></li>\n\t<li><code>1 <= people[i] <= limit <= 3 * 10<sup>4</sup></code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 219,
|
||||
"likes": 226,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -155,7 +155,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"54.4K\", \"totalSubmission\": \"101K\", \"totalAcceptedRaw\": 54413, \"totalSubmissionRaw\": 100964, \"acRate\": \"53.9%\"}",
|
||||
"stats": "{\"totalAccepted\": \"55.9K\", \"totalSubmission\": \"103.9K\", \"totalAcceptedRaw\": 55919, \"totalSubmissionRaw\": 103892, \"acRate\": \"53.8%\"}",
|
||||
"hints": [],
|
||||
"solution": {
|
||||
"id": "70",
|
||||
|
Reference in New Issue
Block a user