1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-13 19:31:42 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

批量更新数据

This commit is contained in:
2025-01-09 20:29:41 +08:00
parent 04ecea043d
commit 48cdd06c2b
5053 changed files with 156164 additions and 135322 deletions

View File

@@ -1,36 +1,40 @@
<p>给你一个二维矩阵 <code>matrix</code> 和一个整数 <code>k</code> ,矩阵大小为 <code>m x n</code> 由非负整数组成。</p>
<p>给你一个二维矩阵 <code>matrix</code> 和一个整数 <code>k</code> ,矩阵大小为&nbsp;<code>m x n</code> 由非负整数组成。</p>
<p>矩阵中坐标 <code>(a, b)</code><strong></strong> 可由对所有满足 <code>0 &lt;= i &lt;= a &lt; m</code> <code>0 &lt;= j &lt;= b &lt; n</code> 的元素 <code>matrix[i][j]</code><strong>下标从 0 开始计数</strong>执行异或运算得到</p>
<p>矩阵中坐标 <code>(a, b)</code><strong>目标</strong>&nbsp;可以通过对所有元素 <code>matrix[i][j]</code>&nbsp;执行异或运算得到,其中&nbsp;<code>i</code>&nbsp;&nbsp;<code>j</code> 满足 <code>0 &lt;= i &lt;= a &lt; m</code> <code>0 &lt;= j &lt;= b &lt; n</code><strong>下标从 0 开始计数</strong>)。</p>
<p>请你找出 <code>matrix</code> 的所有坐标中第 <code>k</code> 大的值(<strong><code>k</code> 的值从 1 开始计数</strong>)。</p>
<p>请你找出&nbsp;<code>matrix</code> 的所有坐标中第 <code>k</code> 大的目标值(<strong><code>k</code> 的值从 1 开始计数</strong>)。</p>
<p> </p>
<p>&nbsp;</p>
<p><strong>示例 1</strong></p>
<pre><strong>输入:</strong>matrix = [[5,2],[1,6]], k = 1
<pre>
<strong>输入:</strong>matrix = [[5,2],[1,6]], k = 1
<strong>输出:</strong>7
<strong>解释:</strong>坐标 (0,1) 的值是 5 XOR 2 = 7 ,为最大的值。</pre>
<strong>解释:</strong>坐标 (0,1) 的目标值是 5 XOR 2 = 7 ,为最大的目标值。</pre>
<p><strong>示例 2</strong></p>
<pre><strong>输入:</strong>matrix = [[5,2],[1,6]], k = 2
<pre>
<strong>输入:</strong>matrix = [[5,2],[1,6]], k = 2
<strong>输出:</strong>5
<strong>解释:</strong>坐标 (0,0) 的值是 5 = 5 ,为第 2 大的值。</pre>
<strong>解释:</strong>坐标 (0,0) 的目标值是 5 = 5 ,为第 2 大的目标值。</pre>
<p><strong>示例 3</strong></p>
<pre><strong>输入:</strong>matrix = [[5,2],[1,6]], k = 3
<pre>
<strong>输入:</strong>matrix = [[5,2],[1,6]], k = 3
<strong>输出:</strong>4
<strong>解释:</strong>坐标 (1,0) 的值是 5 XOR 1 = 4 ,为第 3 大的值。</pre>
<strong>解释:</strong>坐标 (1,0) 的目标值是 5 XOR 1 = 4 ,为第 3 大的目标值。</pre>
<p><strong>示例 4</strong></p>
<pre><strong>输入:</strong>matrix = [[5,2],[1,6]], k = 4
<pre>
<strong>输入:</strong>matrix = [[5,2],[1,6]], k = 4
<strong>输出:</strong>0
<strong>解释:</strong>坐标 (1,1) 的值是 5 XOR 2 XOR 1 XOR 6 = 0 ,为第 4 大的值。</pre>
<strong>解释:</strong>坐标 (1,1) 的目标值是 5 XOR 2 XOR 1 XOR 6 = 0 ,为第 4 大的目标值。</pre>
<p> </p>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>