mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-22 13:36:46 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>如果序列 <code>X_1, X_2, ..., X_n</code> 满足下列条件,就说它是 <em>斐波那契式 </em>的:</p>\n\n<ul>\n\t<li><code>n >= 3</code></li>\n\t<li>对于所有 <code>i + 2 <= n</code>,都有 <code>X_i + X_{i+1} = X_{i+2}</code></li>\n</ul>\n\n<p>给定一个<strong>严格递增</strong>的正整数数组形成序列 arr ,找到 <font color=\"#c7254e\"><font face=\"Menlo, Monaco, Consolas, Courier New, monospace\"><span style=\"font-size:12.600000381469727px\"><span style=\"caret-color:#c7254e\"><span style=\"background-color:#f9f2f4\">arr</span></span></span></font></font> 中最长的斐波那契式的子序列的长度。如果一个不存在,返回 0 。</p>\n\n<p><em>(回想一下,子序列是从原序列 <font color=\"#c7254e\"><font face=\"Menlo, Monaco, Consolas, Courier New, monospace\"><span style=\"font-size:12.600000381469727px\"><span style=\"caret-color:#c7254e\"><span style=\"background-color:#f9f2f4\">arr</span></span></span></font></font> 中派生出来的,它从 <font color=\"#c7254e\"><font face=\"Menlo, Monaco, Consolas, Courier New, monospace\"><span style=\"font-size:12.600000381469727px\"><span style=\"caret-color:#c7254e\"><span style=\"background-color:#f9f2f4\">arr</span></span></span></font></font> 中删掉任意数量的元素(也可以不删),而不改变其余元素的顺序。例如, <code>[3, 5, 8]</code> 是 <code>[3, 4, 5, 6, 7, 8]</code> 的一个子序列)</em></p>\n\n<p> </p>\n\n<ul>\n</ul>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入: </strong>arr =<strong> </strong>[1,2,3,4,5,6,7,8]\n<strong>输出: </strong>5\n<strong>解释: </strong>最长的斐波那契式子序列为 [1,2,3,5,8] 。\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入: </strong>arr =<strong> </strong>[1,3,7,11,12,14,18]\n<strong>输出: </strong>3\n<strong>解释</strong>: 最长的斐波那契式子序列有 [1,11,12]、[3,11,14] 以及 [7,11,18] 。\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>3 <= arr.length <= 1000</code></li>\n\t<li>\n\t<p><code>1 <= arr[i] < arr[i + 1] <= 10^9</code></p>\n\t</li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 218,
|
||||
"likes": 222,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[{\"title\": \"Fibonacci Number\", \"titleSlug\": \"fibonacci-number\", \"difficulty\": \"Easy\", \"translatedTitle\": \"\\u6590\\u6ce2\\u90a3\\u5951\\u6570\"}]",
|
||||
@@ -149,7 +149,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"19K\", \"totalSubmission\": \"36.1K\", \"totalAcceptedRaw\": 18968, \"totalSubmissionRaw\": 36124, \"acRate\": \"52.5%\"}",
|
||||
"stats": "{\"totalAccepted\": \"19.7K\", \"totalSubmission\": \"37.3K\", \"totalAcceptedRaw\": 19660, \"totalSubmissionRaw\": 37315, \"acRate\": \"52.7%\"}",
|
||||
"hints": [],
|
||||
"solution": {
|
||||
"id": "58",
|
||||
|
Reference in New Issue
Block a user