mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-22 13:36:46 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>你要开发一座金矿,地质勘测学家已经探明了这座金矿中的资源分布,并用大小为 <code>m * n</code> 的网格 <code>grid</code> 进行了标注。每个单元格中的整数就表示这一单元格中的黄金数量;如果该单元格是空的,那么就是 <code>0</code>。</p>\n\n<p>为了使收益最大化,矿工需要按以下规则来开采黄金:</p>\n\n<ul>\n\t<li>每当矿工进入一个单元,就会收集该单元格中的所有黄金。</li>\n\t<li>矿工每次可以从当前位置向上下左右四个方向走。</li>\n\t<li>每个单元格只能被开采(进入)一次。</li>\n\t<li><strong>不得开采</strong>(进入)黄金数目为 <code>0</code> 的单元格。</li>\n\t<li>矿工可以从网格中 <strong>任意一个</strong> 有黄金的单元格出发或者是停止。</li>\n</ul>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre><strong>输入:</strong>grid = [[0,6,0],[5,8,7],[0,9,0]]\n<strong>输出:</strong>24\n<strong>解释:</strong>\n[[0,6,0],\n [5,8,7],\n [0,9,0]]\n一种收集最多黄金的路线是:9 -> 8 -> 7。\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre><strong>输入:</strong>grid = [[1,0,7],[2,0,6],[3,4,5],[0,3,0],[9,0,20]]\n<strong>输出:</strong>28\n<strong>解释:</strong>\n[[1,0,7],\n [2,0,6],\n [3,4,5],\n [0,3,0],\n [9,0,20]]\n一种收集最多黄金的路线是:1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7。\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= grid.length, grid[i].length <= 15</code></li>\n\t<li><code>0 <= grid[i][j] <= 100</code></li>\n\t<li>最多 <strong>25 </strong>个单元格中有黄金。</li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 200,
|
||||
"likes": 203,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -149,7 +149,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"34.9K\", \"totalSubmission\": \"50K\", \"totalAcceptedRaw\": 34881, \"totalSubmissionRaw\": 49977, \"acRate\": \"69.8%\"}",
|
||||
"stats": "{\"totalAccepted\": \"35.4K\", \"totalSubmission\": \"50.8K\", \"totalAcceptedRaw\": 35405, \"totalSubmissionRaw\": 50768, \"acRate\": \"69.7%\"}",
|
||||
"hints": [
|
||||
"Use recursion to try all such paths and find the one with the maximum value."
|
||||
],
|
||||
|
Reference in New Issue
Block a user