mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-07 00:11:41 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>Excel 表中的一个单元格 <code>(r, c)</code> 会以字符串 <code>\"<col><row>\"</code> 的形式进行表示,其中:</p>\n\n<ul>\n\t<li><code><col></code> 即单元格的列号 <code>c</code> 。用英文字母表中的 <strong>字母</strong> 标识。\n\n\t<ul>\n\t\t<li>例如,第 <code>1</code> 列用 <code>'A'</code> 表示,第 <code>2</code> 列用 <code>'B'</code> 表示,第 <code>3</code> 列用 <code>'C'</code> 表示,以此类推。</li>\n\t</ul>\n\t</li>\n\t<li><code><row></code> 即单元格的行号 <code>r</code> 。第 <code>r</code> 行就用 <strong>整数</strong> <code>r</code> 标识。</li>\n</ul>\n\n<p>给你一个格式为 <code>\"<col1><row1>:<col2><row2>\"</code> 的字符串 <code>s</code> ,其中 <code><col1></code> 表示 <code>c1</code> 列,<code><row1></code> 表示 <code>r1</code> 行,<code><col2></code> 表示 <code>c2</code> 列,<code><row2></code> 表示 <code>r2</code> 行,并满足 <code>r1 <= r2</code> 且 <code>c1 <= c2</code> 。</p>\n\n<p>找出所有满足 <code>r1 <= x <= r2</code> 且 <code>c1 <= y <= c2</code> 的单元格,并以列表形式返回。单元格应该按前面描述的格式用 <strong>字符串</strong> 表示,并以 <strong>非递减</strong> 顺序排列(先按列排,再按行排)。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<p><img alt=\"\" src=\"https://assets.leetcode.com/uploads/2022/02/08/ex1drawio.png\" style=\"width: 250px; height: 160px;\" /></p>\n\n<pre>\n<strong>输入:</strong>s = \"K1:L2\"\n<strong>输出:</strong>[\"K1\",\"K2\",\"L1\",\"L2\"]\n<strong>解释:</strong>\n上图显示了列表中应该出现的单元格。\n红色箭头指示单元格的出现顺序。\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<p><img alt=\"\" src=\"https://assets.leetcode.com/uploads/2022/02/09/exam2drawio.png\" style=\"width: 500px; height: 50px;\" /></p>\n\n<pre>\n<strong>输入:</strong>s = \"A1:F1\"\n<strong>输出:</strong>[\"A1\",\"B1\",\"C1\",\"D1\",\"E1\",\"F1\"]\n<strong>解释:</strong>\n上图显示了列表中应该出现的单元格。 \n红色箭头指示单元格的出现顺序。\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>s.length == 5</code></li>\n\t<li><code>'A' <= s[0] <= s[3] <= 'Z'</code></li>\n\t<li><code>'1' <= s[1] <= s[4] <= '9'</code></li>\n\t<li><code>s</code> 由大写英文字母、数字、和 <code>':'</code> 组成</li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 6,
|
||||
"likes": 8,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -137,7 +137,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"9.4K\", \"totalSubmission\": \"11K\", \"totalAcceptedRaw\": 9378, \"totalSubmissionRaw\": 11021, \"acRate\": \"85.1%\"}",
|
||||
"stats": "{\"totalAccepted\": \"9.9K\", \"totalSubmission\": \"11.7K\", \"totalAcceptedRaw\": 9914, \"totalSubmissionRaw\": 11657, \"acRate\": \"85.0%\"}",
|
||||
"hints": [
|
||||
"From the given string, find the corresponding rows and columns.",
|
||||
"Iterate through the columns in ascending order and for each column, iterate through the rows in ascending order to obtain the required cells in sorted order."
|
||||
|
Reference in New Issue
Block a user