1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-04 23:11:41 +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>给定一个方阵,其中每个单元(像素)非黑即白。设计一个算法,找出 4 条边皆为黑色像素的最大子方阵。</p>\n\n<p>返回一个数组 <code>[r, c, size]</code> ,其中&nbsp;<code>r</code>,&nbsp;<code>c</code>&nbsp;分别代表子方阵左上角的行号和列号,<code>size</code> 是子方阵的边长。若有多个满足条件的子方阵,返回 <code>r</code> 最小的,若 <code>r</code> 相同,返回 <code>c</code> 最小的子方阵。若无满足条件的子方阵,返回空数组。</p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre><strong>输入:\n</strong>[\n&nbsp; [1,0,1],\n&nbsp; [<strong>0,0</strong>,1],\n&nbsp; [<strong>0,0</strong>,1]\n]\n<strong>输出: </strong>[1,0,2]\n<strong>解释: </strong>输入中 0 代表黑色1 代表白色,标粗的元素即为满足条件的最大子方阵\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre><strong>输入:\n</strong>[\n&nbsp; [<strong>0</strong>,1,1],\n&nbsp; [1,0,1],\n&nbsp; [1,1,0]\n]\n<strong>输出: </strong>[0,0,1]\n</pre>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>matrix.length == matrix[0].length &lt;= 200</code></li>\n</ul>\n",
"isPaidOnly": false,
"difficulty": "Medium",
"likes": 35,
"likes": 37,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
@@ -149,7 +149,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"5.6K\", \"totalSubmission\": \"15K\", \"totalAcceptedRaw\": 5617, \"totalSubmissionRaw\": 14959, \"acRate\": \"37.5%\"}",
"stats": "{\"totalAccepted\": \"5.8K\", \"totalSubmission\": \"15.5K\", \"totalAcceptedRaw\": 5819, \"totalSubmissionRaw\": 15523, \"acRate\": \"37.5%\"}",
"hints": [
"从蛮力解法开始。你能先试试最大的正方形吗?",
"最大的正方形是N×N。所以你先试一下该正方形如果可行那么你便知道已经找到了最佳正方形。否则可以尝试下一个最小的正方形。",