mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-02 14:12:17 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给出一些不同颜色的盒子<meta charset=\"UTF-8\" /> <code>boxes</code> ,盒子的颜色由不同的正数表示。</p>\n\n<p>你将经过若干轮操作去去掉盒子,直到所有的盒子都去掉为止。每一轮你可以移除具有相同颜色的连续 <code>k</code> 个盒子(<code>k >= 1</code>),这样一轮之后你将得到 <code>k * k</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>boxes = [1,3,2,2,2,3,4,3,1]\n<strong>输出:</strong>23\n<strong>解释:</strong>\n[1, 3, 2, 2, 2, 3, 4, 3, 1] \n----> [1, 3, 3, 4, 3, 1] (3*3=9 分) \n----> [1, 3, 3, 3, 1] (1*1=1 分) \n----> [1, 1] (3*3=9 分) \n----> [] (2*2=4 分)\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong>boxes = [1,1,1]\n<strong>输出:</strong>9\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre>\n<strong>输入:</strong>boxes = [1]\n<strong>输出:</strong>1\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= boxes.length <= 100</code></li>\n\t<li><code>1 <= boxes[i] <= 100</code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Hard",
|
||||
"likes": 336,
|
||||
"likes": 338,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[{\"title\": \"Strange Printer\", \"titleSlug\": \"strange-printer\", \"difficulty\": \"Hard\", \"translatedTitle\": \"\\u5947\\u602a\\u7684\\u6253\\u5370\\u673a\"}]",
|
||||
@@ -149,7 +149,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"15.9K\", \"totalSubmission\": \"25.5K\", \"totalAcceptedRaw\": 15893, \"totalSubmissionRaw\": 25464, \"acRate\": \"62.4%\"}",
|
||||
"stats": "{\"totalAccepted\": \"16K\", \"totalSubmission\": \"25.7K\", \"totalAcceptedRaw\": 16036, \"totalSubmissionRaw\": 25748, \"acRate\": \"62.3%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
|
Reference in New Issue
Block a user