mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-22 13:36:46 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>这里有一幅服务器分布图,服务器的位置标识在 <code>m * n</code> 的整数矩阵网格 <code>grid</code> 中,1 表示单元格上有服务器,0 表示没有。</p>\n\n<p>如果两台服务器位于同一行或者同一列,我们就认为它们之间可以进行通信。</p>\n\n<p>请你统计并返回能够与至少一台其他服务器进行通信的服务器的数量。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<p><img alt=\"\" src=\"https://assets.leetcode-cn.com/aliyun-lc-upload/uploads/2019/11/24/untitled-diagram-6.jpg\" style=\"height: 203px; width: 202px;\"></p>\n\n<pre><strong>输入:</strong>grid = [[1,0],[0,1]]\n<strong>输出:</strong>0\n<strong>解释:</strong>没有一台服务器能与其他服务器进行通信。</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<p><strong><img alt=\"\" src=\"https://assets.leetcode-cn.com/aliyun-lc-upload/uploads/2019/11/24/untitled-diagram-4-1.jpg\" style=\"height: 203px; width: 203px;\"></strong></p>\n\n<pre><strong>输入:</strong>grid = [[1,0],[1,1]]\n<strong>输出:</strong>3\n<strong>解释:</strong>所有这些服务器都至少可以与一台别的服务器进行通信。\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<p><img alt=\"\" src=\"https://assets.leetcode-cn.com/aliyun-lc-upload/uploads/2019/11/24/untitled-diagram-1-3.jpg\" style=\"height: 443px; width: 443px;\"></p>\n\n<pre><strong>输入:</strong>grid = [[1,1,0,0],[0,0,1,0],[0,0,1,0],[0,0,0,1]]\n<strong>输出:</strong>4\n<strong>解释:</strong>第一行的两台服务器互相通信,第三列的两台服务器互相通信,但右下角的服务器无法与其他服务器通信。\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>m == grid.length</code></li>\n\t<li><code>n == grid[i].length</code></li>\n\t<li><code>1 <= m <= 250</code></li>\n\t<li><code>1 <= n <= 250</code></li>\n\t<li><code>grid[i][j] == 0 or 1</code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 44,
|
||||
"likes": 45,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -167,7 +167,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"10.5K\", \"totalSubmission\": \"17.2K\", \"totalAcceptedRaw\": 10508, \"totalSubmissionRaw\": 17236, \"acRate\": \"61.0%\"}",
|
||||
"stats": "{\"totalAccepted\": \"10.7K\", \"totalSubmission\": \"17.5K\", \"totalAcceptedRaw\": 10702, \"totalSubmissionRaw\": 17546, \"acRate\": \"61.0%\"}",
|
||||
"hints": [
|
||||
"Store number of computer in each row and column.",
|
||||
"Count all servers that are not isolated."
|
||||
|
Reference in New Issue
Block a user