mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-25 23:08:57 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给你一个大小为 <code>m x n</code> 的网格和一个球。球的起始坐标为 <code>[startRow, startColumn]</code> 。你可以将球移到在四个方向上相邻的单元格内(可以穿过网格边界到达网格之外)。你 <strong>最多</strong> 可以移动 <code>maxMove</code> 次球。</p>\n\n<p>给你五个整数 <code>m</code>、<code>n</code>、<code>maxMove</code>、<code>startRow</code> 以及 <code>startColumn</code> ,找出并返回可以将球移出边界的路径数量。因为答案可能非常大,返回对 <code>10<sup>9</sup> + 7</code> <strong>取余</strong> 后的结果。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n<img alt=\"\" src=\"https://assets.leetcode.com/uploads/2021/04/28/out_of_boundary_paths_1.png\" style=\"width: 500px; height: 296px;\" />\n<pre>\n<strong>输入:</strong>m = 2, n = 2, maxMove = 2, startRow = 0, startColumn = 0\n<strong>输出:</strong>6\n</pre>\n\n<p><strong>示例 2:</strong></p>\n<img alt=\"\" src=\"https://assets.leetcode.com/uploads/2021/04/28/out_of_boundary_paths_2.png\" style=\"width: 500px; height: 293px;\" />\n<pre>\n<strong>输入:</strong>m = 1, n = 3, maxMove = 3, startRow = 0, startColumn = 1\n<strong>输出:</strong>12\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= m, n <= 50</code></li>\n\t<li><code>0 <= maxMove <= 50</code></li>\n\t<li><code>0 <= startRow < m</code></li>\n\t<li><code>0 <= startColumn < n</code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 231,
|
||||
"likes": 234,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[{\"title\": \"Knight Probability in Chessboard\", \"titleSlug\": \"knight-probability-in-chessboard\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u9a91\\u58eb\\u5728\\u68cb\\u76d8\\u4e0a\\u7684\\u6982\\u7387\"}]",
|
||||
@@ -137,7 +137,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"28.9K\", \"totalSubmission\": \"61.6K\", \"totalAcceptedRaw\": 28939, \"totalSubmissionRaw\": 61581, \"acRate\": \"47.0%\"}",
|
||||
"stats": "{\"totalAccepted\": \"29.6K\", \"totalSubmission\": \"63K\", \"totalAcceptedRaw\": 29566, \"totalSubmissionRaw\": 63048, \"acRate\": \"46.9%\"}",
|
||||
"hints": [
|
||||
"Is traversing every path feasible? There are many possible paths for a small matrix. Try to optimize it.",
|
||||
"Can we use some space to store the number of paths and update them after every move?",
|
||||
|
||||
Reference in New Issue
Block a user