mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-05 07:21:40 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p><code>n</code> 块石头放置在二维平面中的一些整数坐标点上。每个坐标点上最多只能有一块石头。</p>\n\n<p>如果一块石头的 <strong>同行或者同列</strong> 上有其他石头存在,那么就可以移除这块石头。</p>\n\n<p>给你一个长度为 <code>n</code> 的数组 <code>stones</code> ,其中 <code>stones[i] = [x<sub>i</sub>, y<sub>i</sub>]</code> 表示第 <code>i</code> 块石头的位置,返回 <strong>可以移除的石子</strong> 的最大数量。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong>stones = [[0,0],[0,1],[1,0],[1,2],[2,1],[2,2]]\n<strong>输出:</strong>5\n<strong>解释:</strong>一种移除 5 块石头的方法如下所示:\n1. 移除石头 [2,2] ,因为它和 [2,1] 同行。\n2. 移除石头 [2,1] ,因为它和 [0,1] 同列。\n3. 移除石头 [1,2] ,因为它和 [1,0] 同行。\n4. 移除石头 [1,0] ,因为它和 [0,0] 同列。\n5. 移除石头 [0,1] ,因为它和 [0,0] 同行。\n石头 [0,0] 不能移除,因为它没有与另一块石头同行/列。</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong>stones = [[0,0],[0,2],[1,1],[2,0],[2,2]]\n<strong>输出:</strong>3\n<strong>解释:</strong>一种移除 3 块石头的方法如下所示:\n1. 移除石头 [2,2] ,因为它和 [2,0] 同行。\n2. 移除石头 [2,0] ,因为它和 [0,0] 同列。\n3. 移除石头 [0,2] ,因为它和 [0,0] 同行。\n石头 [0,0] 和 [1,1] 不能移除,因为它们没有与另一块石头同行/列。</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre>\n<strong>输入:</strong>stones = [[0,0]]\n<strong>输出:</strong>0\n<strong>解释:</strong>[0,0] 是平面上唯一一块石头,所以不可以移除它。</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= stones.length <= 1000</code></li>\n\t<li><code>0 <= x<sub>i</sub>, y<sub>i</sub> <= 10<sup>4</sup></code></li>\n\t<li>不会有两块石头放在同一个坐标点上</li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 261,
|
||||
"likes": 266,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -149,7 +149,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"27.8K\", \"totalSubmission\": \"45.4K\", \"totalAcceptedRaw\": 27809, \"totalSubmissionRaw\": 45397, \"acRate\": \"61.3%\"}",
|
||||
"stats": "{\"totalAccepted\": \"28.1K\", \"totalSubmission\": \"46K\", \"totalAcceptedRaw\": 28145, \"totalSubmissionRaw\": 45989, \"acRate\": \"61.2%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
|
Reference in New Issue
Block a user