mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-09 01:11:42 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给定四个整数 <code>row</code> , <code>cols</code> , <code>rCenter</code> 和 <code>cCenter</code> 。有一个 <code>rows x cols</code> 的矩阵,你在单元格上的坐标是 <code>(rCenter, cCenter)</code> 。</p>\n\n<p>返回矩阵中的所有单元格的坐标,并按与<em> </em><code>(rCenter, cCenter)</code><em> </em>的 <strong>距离</strong> 从最小到最大的顺序排。你可以按 <strong>任何</strong> 满足此条件的顺序返回答案。</p>\n\n<p>单元格<code>(r1, c1)</code> 和 <code>(r2, c2)</code> 之间的距离为<code>|r1 - r2| + |c1 - c2|</code>。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong>rows = 1, cols = 2, rCenter = 0, cCenter = 0\n<strong>输出:</strong>[[0,0],[0,1]]\n<strong>解释</strong>:从 (r0, c0) 到其他单元格的距离为:[0,1]\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong>rows = 2, cols = 2, rCenter = 0, cCenter = 1\n<strong>输出:</strong>[[0,1],[0,0],[1,1],[1,0]]\n<strong>解释</strong>:从 (r0, c0) 到其他单元格的距离为:[0,1,1,2]\n[[0,1],[1,1],[0,0],[1,0]] 也会被视作正确答案。\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre>\n<strong>输入:</strong>rows = 2, cols = 3, rCenter = 1, cCenter = 2\n<strong>输出:</strong>[[1,2],[0,2],[1,1],[0,1],[1,0],[0,0]]\n<strong>解释</strong>:从 (r0, c0) 到其他单元格的距离为:[0,1,1,2,2,3]\n其他满足题目要求的答案也会被视为正确,例如 [[1,2],[1,1],[0,2],[1,0],[0,1],[0,0]]。\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= rows, cols <= 100</code></li>\n\t<li><code>0 <= rCenter < rows</code></li>\n\t<li><code>0 <= cCenter < cols</code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 123,
|
||||
"likes": 127,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -161,7 +161,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"42.6K\", \"totalSubmission\": \"60K\", \"totalAcceptedRaw\": 42563, \"totalSubmissionRaw\": 60014, \"acRate\": \"70.9%\"}",
|
||||
"stats": "{\"totalAccepted\": \"43K\", \"totalSubmission\": \"60.7K\", \"totalAcceptedRaw\": 43045, \"totalSubmissionRaw\": 60705, \"acRate\": \"70.9%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
|
Reference in New Issue
Block a user