logo AlgoBeat OnlineJudge
登录 注册

#215447. [VKOSHP 2025] Puzzle

内存限制:512 MiB 时间限制:1000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

You are presented with a puzzle. Given a table of rows and 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.

输入格式

The first line contains two integers and (; ) --- the number of rows and columns.

Each of the following lines contains characters or --- the elements of the initial table.

输出格式

Output a single integer --- the maximum number of identical rows that can be obtained.

样例

样例输入 1

3 4
0101
0010
0100

样例输出 1

2