mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-21 21:16:45 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给你一个 <strong>下标从 0 开始</strong> 的整数数组 <code>nums</code> ,返回满足下述条件的 <strong>不同</strong> 四元组 <code>(a, b, c, d)</code> 的 <strong>数目</strong> :</p>\n\n<ul>\n\t<li><code>nums[a] + nums[b] + nums[c] == nums[d]</code> ,且</li>\n\t<li><code>a < b < c < d</code></li>\n</ul>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre><strong>输入:</strong>nums = [1,2,3,6]\n<strong>输出:</strong>1\n<strong>解释:</strong>满足要求的唯一一个四元组是 (0, 1, 2, 3) 因为 1 + 2 + 3 == 6 。\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre><strong>输入:</strong>nums = [3,3,6,4,5]\n<strong>输出:</strong>0\n<strong>解释:</strong>[3,3,6,4,5] 中不存在满足要求的四元组。\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre><strong>输入:</strong>nums = [1,1,1,3,5]\n<strong>输出:</strong>4\n<strong>解释:</strong>满足要求的 4 个四元组如下:\n- (0, 1, 2, 3): 1 + 1 + 1 == 3\n- (0, 1, 3, 4): 1 + 1 + 3 == 5\n- (0, 2, 3, 4): 1 + 1 + 3 == 5\n- (1, 2, 3, 4): 1 + 1 + 3 == 5\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>4 <= nums.length <= 50</code></li>\n\t<li><code>1 <= nums[i] <= 100</code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 104,
|
||||
"likes": 107,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -143,7 +143,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"33.5K\", \"totalSubmission\": \"50.5K\", \"totalAcceptedRaw\": 33462, \"totalSubmissionRaw\": 50501, \"acRate\": \"66.3%\"}",
|
||||
"stats": "{\"totalAccepted\": \"33.9K\", \"totalSubmission\": \"51.1K\", \"totalAcceptedRaw\": 33853, \"totalSubmissionRaw\": 51083, \"acRate\": \"66.3%\"}",
|
||||
"hints": [
|
||||
"N is very small, how can we use that?",
|
||||
"Can we check every possible quadruplet?"
|
||||
|
Reference in New Issue
Block a user