#K12241. Maximum Unique Problems
Maximum Unique Problems
Maximum Unique Problems
You are given n participants and m problems. Each participant's performance is represented by a binary string of length m, where '1' indicates that the problem was solved and '0' indicates it was not.
For any distinct pair of participants i and j, we define the unique problems count as the number of problems for which exactly one participant solved the problem (i.e. the symmetric difference of the solved problem sets).
Your task is to compute the maximum unique problems count over all pairs of participants.
Note: If there is only one participant, then no pair can be formed, and the answer is 0.
inputFormat
The first line contains two integers n and m separated by a space, where n is the number of participants and m is the number of problems.
The following n lines each contain a binary string of length m representing the problem outcomes for a participant.
outputFormat
Output a single integer representing the maximum number of problems that are uniquely solved by one of the two participants in any pair.
## sample3 5
10101
11000
01110
4