1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-05 15:31:43 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
Files
leetcode-problemset/leetcode-cn/problem (Chinese)/珠宝的最高价值 [li-wu-de-zui-da-jie-zhi-lcof].html
2025-01-09 20:29:41 +08:00

30 lines
918 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<p>现有一个记作二维矩阵 <code>frame</code> 的珠宝架,其中 <code>frame[i][j]</code> 为该位置珠宝的价值。拿取珠宝的规则为:</p>
<ul>
<li>只能从架子的左上角开始拿珠宝</li>
<li>每次可以移动到右侧或下侧的相邻位置</li>
<li>到达珠宝架子的右下角时,停止拿取</li>
</ul>
<p>注意:珠宝的价值都是大于 0 的。除非这个架子上没有任何珠宝,比如 <code>frame = [[0]]</code></p>
<p>&nbsp;</p>
<p><strong>示例 1</strong></p>
<pre>
<strong>输入:</strong>frame = [[1,3,1],[1,5,1],[4,2,1]]
<strong>输出:</strong><code>12
</code><strong>解释:</strong>路径 1→3→5→2→1 可以拿到最高价值的珠宝</pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>0 &lt; frame.length &lt;= 200</code></li>
<li><code>0 &lt; frame[0].length &lt;= 200</code></li>
</ul>
<p>&nbsp;</p>