1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-11 10:21:43 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

存量题库数据更新

This commit is contained in:
2023-12-09 18:42:21 +08:00
parent a788808cd7
commit c198538f10
10843 changed files with 288489 additions and 248355 deletions

View File

@@ -1,15 +1,15 @@
<p>给你一个&nbsp;<code>n x n</code> 整数矩阵&nbsp;<code>arr</code>&nbsp;,请你返回 <strong>非零偏移下降路径</strong> 数字和的最小值。</p>
<p>给你一个&nbsp;<code>n x n</code> 整数矩阵&nbsp;<code>grid</code>&nbsp;,请你返回 <strong>非零偏移下降路径</strong> 数字和的最小值。</p>
<p><strong>非零偏移下降路径</strong> 定义为:从&nbsp;<code>arr</code> 数组中的每一行选择一个数字,且按顺序选出来的数字中,相邻数字不在原数组的同一列。</p>
<p><strong>非零偏移下降路径</strong> 定义为:从&nbsp;<code>grid</code> 数组中的每一行选择一个数字,且按顺序选出来的数字中,相邻数字不在原数组的同一列。</p>
<p>&nbsp;</p>
<p><strong>示例 1</strong></p>
<p><strong class="example">示例 1</strong></p>
<p><img alt="" src="https://assets.leetcode.com/uploads/2021/08/10/falling-grid.jpg" style="width: 244px; height: 245px;" /></p>
<pre>
<strong>输入:</strong>arr = [[1,2,3],[4,5,6],[7,8,9]]
<strong>输入:</strong>grid = [[1,2,3],[4,5,6],[7,8,9]]
<strong>输出:</strong>13
<strong>解释:</strong>
所有非零偏移下降路径包括:
@@ -19,7 +19,7 @@
下降路径中数字和最小的是&nbsp;[1,5,7] ,所以答案是&nbsp;13 。
</pre>
<p><strong>示例 2</strong></p>
<p><strong class="example">示例 2</strong></p>
<pre>
<strong>输入:</strong>grid = [[7]]