n, m = map(int,input().split())
tatal_max = 1
arr=[]
for i in range(0,n):
arr.append(str(input()))
columns = {}
for j in range(m):
col = ''.join([arr[i][j] for i in range(n)])
if col in columns:
columns[col] += 1
else:
columns[col] = 1
tatal_max = max(columns.values())
print(tatal_max)
就是找相同的列



京公网安备 11010502036488号