22 lines
554 B
Python
22 lines
554 B
Python
n = int(input())
|
|
|
|
combinations = {}
|
|
maxcombi = 0
|
|
combinations[maxcombi] = 0
|
|
|
|
for _ in range(n):
|
|
combi = "".join(sorted(input().strip().split()))
|
|
if combi in combinations.keys():
|
|
combinations[combi] += 1
|
|
if combinations[maxcombi] < combinations[combi]:
|
|
maxcombi = combi
|
|
else:
|
|
combinations[combi] = 1
|
|
|
|
max_value = combinations[maxcombi]
|
|
most_popular = sum(
|
|
[max_value for key in combinations if combinations[key] == max_value]
|
|
)
|
|
|
|
print(most_popular if most_popular > 0 else len(combinations.keys()) - 1)
|