mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-12-18 10:04:58 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给你一个整数数组 <code>nums</code> ,你可以对它进行一些操作。</p>\n\n<p>每次操作中,选择任意一个 <code>nums[i]</code> ,删除它并获得 <code>nums[i]</code> 的点数。之后,你必须删除 <strong>所有 </strong>等于 <code>nums[i] - 1</code> 和 <code>nums[i] + 1</code> 的元素。</p>\n\n<p>开始你拥有 <code>0</code> 个点数。返回你能通过这些操作获得的最大点数。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong>nums = [3,4,2]\n<strong>输出:</strong>6\n<strong>解释:</strong>\n删除 4 获得 4 个点数,因此 3 也被删除。\n之后,删除 2 获得 2 个点数。总共获得 6 个点数。\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong>nums = [2,2,3,3,3,4]\n<strong>输出:</strong>9\n<strong>解释:</strong>\n删除 3 获得 3 个点数,接着要删除两个 2 和 4 。\n之后,再次删除 3 获得 3 个点数,再次删除 3 获得 3 个点数。\n总共获得 9 个点数。\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= nums.length <= 2 * 10<sup>4</sup></code></li>\n\t<li><code>1 <= nums[i] <= 10<sup>4</sup></code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 592,
|
||||
"likes": 619,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[{\"title\": \"House Robber\", \"titleSlug\": \"house-robber\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u6253\\u5bb6\\u52ab\\u820d\"}]",
|
||||
@@ -149,7 +149,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"73.8K\", \"totalSubmission\": \"118K\", \"totalAcceptedRaw\": 73799, \"totalSubmissionRaw\": 117959, \"acRate\": \"62.6%\"}",
|
||||
"stats": "{\"totalAccepted\": \"76.8K\", \"totalSubmission\": \"122.6K\", \"totalAcceptedRaw\": 76809, \"totalSubmissionRaw\": 122621, \"acRate\": \"62.6%\"}",
|
||||
"hints": [
|
||||
"If you take a number, you might as well take them all. Keep track of what the value is of the subset of the input with maximum M when you either take or don't take M."
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user