mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-25 06:48:57 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给你一个正整数数组 <code>values</code>,其中 <code>values[i]</code> 表示第 <code>i</code> 个观光景点的评分,并且两个景点 <code>i</code> 和 <code>j</code> 之间的 <strong>距离</strong> 为 <code>j - i</code>。</p>\n\n<p>一对景点(<code>i < j</code>)组成的观光组合的得分为 <code>values[i] + values[j] + i - j</code> ,也就是景点的评分之和<strong> 减去 </strong>它们两者之间的距离。</p>\n\n<p>返回一对观光景点能取得的最高分。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong>values = [8,1,5,2,6]\n<strong>输出:</strong>11\n<strong>解释:</strong>i = 0, j = 2, values[i] + values[j] + i - j = 8 + 5 + 0 - 2 = 11\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong>values = [1,2]\n<strong>输出:</strong>2\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>2 <= values.length <= 5 * 10<sup>4</sup></code></li>\n\t<li><code>1 <= values[i] <= 1000</code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 299,
|
||||
"likes": 310,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -143,7 +143,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"50.8K\", \"totalSubmission\": \"90.3K\", \"totalAcceptedRaw\": 50764, \"totalSubmissionRaw\": 90282, \"acRate\": \"56.2%\"}",
|
||||
"stats": "{\"totalAccepted\": \"52.5K\", \"totalSubmission\": \"93K\", \"totalAcceptedRaw\": 52455, \"totalSubmissionRaw\": 93004, \"acRate\": \"56.4%\"}",
|
||||
"hints": [
|
||||
"Can you tell the best sightseeing spot in one pass (ie. as you iterate over the input?) What should we store or keep track of as we iterate to do this?"
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user