1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-24 22:38: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>给你一个正方形字符数组&nbsp;<code>board</code>&nbsp;,你从数组最右下方的字符&nbsp;<code>&#39;S&#39;</code>&nbsp;出发。</p>\n\n<p>你的目标是到达数组最左上角的字符&nbsp;<code>&#39;E&#39;</code> ,数组剩余的部分为数字字符&nbsp;<code>1, 2, ..., 9</code>&nbsp;或者障碍 <code>&#39;X&#39;</code>。在每一步移动中,你可以向上、向左或者左上方移动,可以移动的前提是到达的格子没有障碍。</p>\n\n<p>一条路径的 「得分」 定义为:路径上所有数字的和。</p>\n\n<p>请你返回一个列表,包含两个整数:第一个整数是 「得分」 的最大值,第二个整数是得到最大得分的方案数,请把结果对&nbsp;<strong><code>10^9 + 7</code></strong> <strong>取余</strong>。</p>\n\n<p>如果没有任何路径可以到达终点,请返回&nbsp;<code>[0, 0]</code> 。</p>\n\n<p>&nbsp;</p>\n\n<p><strong>示例 1</strong></p>\n\n<pre>\n<strong>输入:</strong>board = [&quot;E23&quot;,&quot;2X2&quot;,&quot;12S&quot;]\n<strong>输出:</strong>[7,1]\n</pre>\n\n<p><strong>示例 2</strong></p>\n\n<pre>\n<strong>输入:</strong>board = [&quot;E12&quot;,&quot;1X1&quot;,&quot;21S&quot;]\n<strong>输出:</strong>[4,2]\n</pre>\n\n<p><strong>示例 3</strong></p>\n\n<pre>\n<strong>输入:</strong>board = [&quot;E11&quot;,&quot;XXX&quot;,&quot;11S&quot;]\n<strong>输出:</strong>[0,0]\n</pre>\n\n<p>&nbsp;</p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>2 &lt;= board.length == board[i].length &lt;= 100</code></li>\n</ul>\n",
"isPaidOnly": false,
"difficulty": "Hard",
"likes": 52,
"likes": 53,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
@@ -149,7 +149,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"4.2K\", \"totalSubmission\": \"11.5K\", \"totalAcceptedRaw\": 4226, \"totalSubmissionRaw\": 11482, \"acRate\": \"36.8%\"}",
"stats": "{\"totalAccepted\": \"4.6K\", \"totalSubmission\": \"12.3K\", \"totalAcceptedRaw\": 4579, \"totalSubmissionRaw\": 12295, \"acRate\": \"37.2%\"}",
"hints": [
"Use dynamic programming to find the path with the max score.",
"Use another dynamic programming array to count the number of paths with max score."