1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-25 23:08:57 +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>在二维网格 <code>grid</code> 上,有 4 种类型的方格:</p>\n\n<ul>\n\t<li><code>1</code> 表示起始方格。且只有一个起始方格。</li>\n\t<li><code>2</code> 表示结束方格,且只有一个结束方格。</li>\n\t<li><code>0</code> 表示我们可以走过的空方格。</li>\n\t<li><code>-1</code> 表示我们无法跨越的障碍。</li>\n</ul>\n\n<p>返回在四个方向(上、下、左、右)上行走时,从起始方格到结束方格的不同路径的数目<strong>。</strong></p>\n\n<p><strong>每一个无障碍方格都要通过一次,但是一条路径中不能重复通过同一个方格</strong>。</p>\n\n<p>&nbsp;</p>\n\n<p><strong>示例 1</strong></p>\n\n<pre><strong>输入:</strong>[[1,0,0,0],[0,0,0,0],[0,0,2,-1]]\n<strong>输出:</strong>2\n<strong>解释:</strong>我们有以下两条路径:\n1. (0,0),(0,1),(0,2),(0,3),(1,3),(1,2),(1,1),(1,0),(2,0),(2,1),(2,2)\n2. (0,0),(1,0),(2,0),(2,1),(1,1),(0,1),(0,2),(0,3),(1,3),(1,2),(2,2)</pre>\n\n<p><strong>示例 2</strong></p>\n\n<pre><strong>输入:</strong>[[1,0,0,0],[0,0,0,0],[0,0,0,2]]\n<strong>输出:</strong>4\n<strong>解释:</strong>我们有以下四条路径: \n1. (0,0),(0,1),(0,2),(0,3),(1,3),(1,2),(1,1),(1,0),(2,0),(2,1),(2,2),(2,3)\n2. (0,0),(0,1),(1,1),(1,0),(2,0),(2,1),(2,2),(1,2),(0,2),(0,3),(1,3),(2,3)\n3. (0,0),(1,0),(2,0),(2,1),(2,2),(1,2),(1,1),(0,1),(0,2),(0,3),(1,3),(2,3)\n4. (0,0),(1,0),(2,0),(2,1),(1,1),(0,1),(0,2),(0,3),(1,3),(1,2),(2,2),(2,3)</pre>\n\n<p><strong>示例 3</strong></p>\n\n<pre><strong>输入:</strong>[[0,1],[2,0]]\n<strong>输出:</strong>0\n<strong>解释:</strong>\n没有一条路能完全穿过每一个空的方格一次。\n请注意起始和结束方格可以位于网格中的任意位置。\n</pre>\n\n<p>&nbsp;</p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 &lt;= grid.length * grid[0].length &lt;= 20</code></li>\n</ul>\n",
"isPaidOnly": false,
"difficulty": "Hard",
"likes": 191,
"likes": 197,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Sudoku Solver\", \"titleSlug\": \"sudoku-solver\", \"difficulty\": \"Hard\", \"translatedTitle\": \"\\u89e3\\u6570\\u72ec\"}, {\"title\": \"Unique Paths II\", \"titleSlug\": \"unique-paths-ii\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u4e0d\\u540c\\u8def\\u5f84 II\"}, {\"title\": \"Word Search II\", \"titleSlug\": \"word-search-ii\", \"difficulty\": \"Hard\", \"translatedTitle\": \"\\u5355\\u8bcd\\u641c\\u7d22 II\"}]",
@@ -155,7 +155,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"16.2K\", \"totalSubmission\": \"22K\", \"totalAcceptedRaw\": 16214, \"totalSubmissionRaw\": 21997, \"acRate\": \"73.7%\"}",
"stats": "{\"totalAccepted\": \"16.6K\", \"totalSubmission\": \"22.7K\", \"totalAcceptedRaw\": 16643, \"totalSubmissionRaw\": 22655, \"acRate\": \"73.5%\"}",
"hints": [],
"solution": {
"id": "126",