1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-07 00:11:41 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

存量题库数据更新

This commit is contained in:
2023-12-09 18:42:21 +08:00
parent a788808cd7
commit c198538f10
10843 changed files with 288489 additions and 248355 deletions

View File

@@ -2,7 +2,7 @@
"data": {
"question": {
"questionId": "3193",
"questionFrontendId": "100120",
"questionFrontendId": "2932",
"categoryTitle": "Algorithms",
"boundTopicId": 2521187,
"title": "Maximum Strong Pair XOR I",
@@ -12,13 +12,44 @@
"translatedContent": "<p>给你一个下标从 <strong>0</strong> 开始的整数数组 <code>nums</code> 。如果一对整数 <code>x</code> 和 <code>y</code> 满足以下条件,则称其为 <strong>强数对</strong> </p>\n\n<ul>\n\t<li><code>|x - y| &lt;= min(x, y)</code></li>\n</ul>\n\n<p>你需要从 <code>nums</code> 中选出两个整数,且满足:这两个整数可以形成一个强数对,并且它们的按位异或(<code>XOR</code>)值是在该数组所有强数对中的<strong> 最大值 </strong>。</p>\n\n<p>返回数组 <code>nums</code> 所有可能的强数对中的<strong> 最大 </strong>异或值。</p>\n\n<p><strong>注意</strong>,你可以选择同一个整数两次来形成一个强数对。</p>\n\n<p>&nbsp;</p>\n\n<p><strong class=\"example\">示例 1</strong></p>\n\n<pre>\n<strong>输入:</strong>nums = [1,2,3,4,5]\n<strong>输出:</strong>7\n<strong>解释:</strong>数组<code> nums </code>中有 11 个强数对:(1, 1), (1, 2), (2, 2), (2, 3), (2, 4), (3, 3), (3, 4), (3, 5), (4, 4), (4, 5) 和 (5, 5) 。\n这些强数对中的最大异或值是 3 XOR 4 = 7 。\n</pre>\n\n<p><strong class=\"example\">示例 2</strong></p>\n\n<pre>\n<strong>输入:</strong>nums = [10,100]\n<strong>输出:</strong>0\n<strong>解释:</strong>数组<code> nums </code>中有 2 个强数对:(10, 10) 和 (100, 100) 。\n这些强数对中的最大异或值是 10 XOR 10 = 0 ,数对 (100, 100) 的异或值也是 100 XOR 100 = 0 。\n</pre>\n\n<p><strong class=\"example\">示例 3</strong></p>\n\n<pre>\n<strong>输入:</strong>nums = [5,6,25,30]\n<strong>输出:</strong>7\n<strong>解释:</strong>数组<code> nums </code>中有 6 个强数对:(5, 5), (5, 6), (6, 6), (25, 25), (25, 30) 和 (30, 30) 。\n这些强数对中的最大异或值是 25 XOR 30 = 7 ;另一个异或值非零的数对是 (5, 6) ,其异或值是 5 XOR 6 = 3 。\n</pre>\n\n<p>&nbsp;</p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 &lt;= nums.length &lt;= 50</code></li>\n\t<li><code>1 &lt;= nums[i] &lt;= 100</code></li>\n</ul>\n",
"isPaidOnly": false,
"difficulty": "Easy",
"likes": 2,
"likes": 3,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": "{\"cpp\": true, \"java\": true, \"python\": true, \"python3\": true, \"mysql\": false, \"mssql\": false, \"oraclesql\": false, \"c\": false, \"csharp\": false, \"javascript\": false, \"typescript\": false, \"bash\": false, \"php\": false, \"swift\": false, \"kotlin\": false, \"dart\": false, \"golang\": false, \"ruby\": false, \"scala\": false, \"html\": false, \"pythonml\": false, \"rust\": false, \"racket\": false, \"erlang\": false, \"elixir\": false, \"pythondata\": false, \"react\": false, \"vanillajs\": false, \"postgresql\": false}",
"topicTags": [],
"topicTags": [
{
"name": "Bit Manipulation",
"slug": "bit-manipulation",
"translatedName": "位运算",
"__typename": "TopicTagNode"
},
{
"name": "Trie",
"slug": "trie",
"translatedName": "字典树",
"__typename": "TopicTagNode"
},
{
"name": "Array",
"slug": "array",
"translatedName": "数组",
"__typename": "TopicTagNode"
},
{
"name": "Hash Table",
"slug": "hash-table",
"translatedName": "哈希表",
"__typename": "TopicTagNode"
},
{
"name": "Sliding Window",
"slug": "sliding-window",
"translatedName": "滑动窗口",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": [
{
@@ -136,7 +167,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"3.6K\", \"totalSubmission\": \"4.9K\", \"totalAcceptedRaw\": 3566, \"totalSubmissionRaw\": 4881, \"acRate\": \"73.1%\"}",
"stats": "{\"totalAccepted\": \"5.1K\", \"totalSubmission\": \"6.9K\", \"totalAcceptedRaw\": 5130, \"totalSubmissionRaw\": 6852, \"acRate\": \"74.9%\"}",
"hints": [
"The constraints are small enough to make brute-force solutions pass."
],