P15309 [VKOSHP 2025] Puzzle
Description
You are presented with a puzzle. Given a table of $n$ rows and $m$ columns filled with zeros and ones.
Only one type of move is allowed: within any column, you can rearrange the elements freely, changing the order of the rows in that column in any way. The number of zeros and ones in each column remains the same.
You are allowed to make as many such moves as you want. The goal of the puzzle is to obtain as many completely identical rows as possible.
Determine the maximum number of rows that can be made completely identical using the described moves.
Input Format
The first line contains two integers $n$ and $m$ ($1 \le n, m \le 10^5$; $nm \le 2 \cdot 10^5$) --- the number of rows and columns.
Each of the following $n$ lines contains $m$ characters $\tt{0}$ or $\tt{1}$ --- the elements of the initial table.
Output Format
Output a single integer --- the maximum number of identical rows that can be obtained.