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

add leetcode problem-cn part1

This commit is contained in:
2022-03-27 20:37:52 +08:00
parent 8e542045d1
commit c554fc6908
1285 changed files with 108123 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
<p>给定&nbsp;<code>m x n</code>&nbsp;矩阵&nbsp;<code>matrix</code>&nbsp;</p>
<p>你可以从中选出任意数量的列并翻转其上的&nbsp;<strong>每个&nbsp;</strong>单元格。(即翻转后,单元格的值从 <code>0</code> 变成 <code>1</code>,或者从 <code>1</code> 变为 <code>0</code> 。)</p>
<p>返回 <em>经过一些翻转后,行与行之间所有值都相等的最大行数</em>&nbsp;</p>
<p>&nbsp;</p>
<ol>
</ol>
<p><strong>示例 1</strong></p>
<pre>
<strong>输入:</strong>matrix = [[0,1],[1,1]]
<strong>输出:</strong>1
<strong>解释:</strong>不进行翻转,有 1 行所有值都相等。
</pre>
<p><strong>示例 2</strong></p>
<pre>
<strong>输入:</strong>matrix = [[0,1],[1,0]]
<strong>输出:</strong>2
<strong>解释:</strong>翻转第一列的值之后,这两行都由相等的值组成。
</pre>
<p><strong>示例 3</strong></p>
<pre>
<strong>输入:</strong>matrix = [[0,0,0],[0,0,1],[1,1,0]]
<strong>输出:</strong>2
<strong>解释:</strong>翻转前两列的值之后,后两行由相等的值组成。</pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>m == matrix.length</code></li>
<li><code>n == matrix[i].length</code></li>
<li><code>1 &lt;= m, n &lt;= 300</code></li>
<li><code>matrix[i][j] == 0</code>&nbsp;<code>1</code></li>
</ul>