mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-22 21:46:46 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>我们有一个非负整数数组<meta charset=\"UTF-8\" /> <code>arr</code> 。</p>\n\n<p>对于每个(连续的)子数组<meta charset=\"UTF-8\" /> <code>sub = [arr[i], arr[i + 1], ..., arr[j]]</code> ( <code>i <= j</code>),我们对<meta charset=\"UTF-8\" /> <code>sub</code> 中的每个元素进行按位或操作,获得结果<meta charset=\"UTF-8\" /> <code>arr[i] | arr[i + 1] | ... | arr[j]</code> 。</p>\n\n<p>返回可能结果的数量。 多次出现的结果在最终答案中仅计算一次。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong>arr = [0]\n<strong>输出:</strong>1\n<strong>解释:</strong>\n只有一个可能的结果 0 。\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong>arr = [1,1,2]\n<strong>输出:</strong>3\n<strong>解释:</strong>\n可能的子数组为 [1],[1],[2],[1, 1],[1, 2],[1, 1, 2]。\n产生的结果为 1,1,2,1,3,3 。\n有三个唯一值,所以答案是 3 。\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre>\n<strong>输入:</strong>arr = [1,2,4]\n<strong>输出:</strong>6\n<strong>解释:</strong>\n可能的结果是 1,2,3,4,6,以及 7 。\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong><meta charset=\"UTF-8\" /></p>\n\n<ul>\n\t<li><code>1 <= nums.length <= 5 * 10<sup>4</sup></code></li>\n\t<li><code>0 <= nums[i] <= 10<sup>9</sup></code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 109,
|
||||
"likes": 112,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -149,7 +149,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"6.2K\", \"totalSubmission\": \"17.6K\", \"totalAcceptedRaw\": 6169, \"totalSubmissionRaw\": 17634, \"acRate\": \"35.0%\"}",
|
||||
"stats": "{\"totalAccepted\": \"6.3K\", \"totalSubmission\": \"17.9K\", \"totalAcceptedRaw\": 6299, \"totalSubmissionRaw\": 17891, \"acRate\": \"35.2%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
|
Reference in New Issue
Block a user