1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-05 07:21:40 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-05-02 23:44:12 +08:00
parent 7ea03594b3
commit 2a71c78585
4790 changed files with 11696 additions and 10944 deletions

View File

@@ -12,7 +12,7 @@
"translatedContent": "<p>黑板上写着一个非负整数数组 <code>nums[i]</code> 。</p>\n\n<p>Alice 和 Bob 轮流从黑板上擦掉一个数字Alice 先手。如果擦除一个数字后,剩余的所有数字按位异或运算得出的结果等于 <code>0</code> 的话,当前玩家游戏失败。&nbsp;另外,如果只剩一个数字,按位异或运算得到它本身;如果无数字剩余,按位异或运算结果为&nbsp;<code>0</code>。</p>\n\n<p>并且,轮到某个玩家时,如果当前黑板上所有数字按位异或运算结果等于 <code>0</code> ,这个玩家获胜。</p>\n\n<p>假设两个玩家每步都使用最优解,当且仅当 Alice 获胜时返回 <code>true</code>。</p>\n\n<p>&nbsp;</p>\n\n<p><strong>示例 1</strong></p>\n\n<pre>\n<strong>输入:</strong> nums = [1,1,2]\n<strong>输出:</strong> false\n<strong>解释:</strong> \nAlice 有两个选择: 擦掉数字 1 或 2。\n如果擦掉 1, 数组变成 [1, 2]。剩余数字按位异或得到 1 XOR 2 = 3。那么 Bob 可以擦掉任意数字,因为 Alice 会成为擦掉最后一个数字的人,她总是会输。\n如果 Alice 擦掉 2那么数组变成[1, 1]。剩余数字按位异或得到 1 XOR 1 = 0。Alice 仍然会输掉游戏。\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong> nums = [0,1]\n<strong>输出:</strong> true\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre>\n<strong>输入:</strong> nums = [1,2,3]\n<strong>输出:</strong> true\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;= 1000</code></li>\n\t<li><code>0 &lt;= nums[i] &lt; 2<sup>16</sup></code></li>\n</ul>\n",
"isPaidOnly": false,
"difficulty": "Hard",
"likes": 134,
"likes": 135,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
@@ -161,7 +161,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"17.3K\", \"totalSubmission\": \"23.8K\", \"totalAcceptedRaw\": 17324, \"totalSubmissionRaw\": 23769, \"acRate\": \"72.9%\"}",
"stats": "{\"totalAccepted\": \"17.6K\", \"totalSubmission\": \"24.1K\", \"totalAcceptedRaw\": 17575, \"totalSubmissionRaw\": 24106, \"acRate\": \"72.9%\"}",
"hints": [],
"solution": null,
"status": null,