#K91312. Minimum Number of Guides
Minimum Number of Guides
Minimum Number of Guides
You are given n visitor groups. Each group has a visitation schedule represented as a binary string of length 7. Each character in the string corresponds to a time slot in the day (from slot 1 to slot 7). If the ith character is '1', the group visits during that slot; if it is '0', they do not.
A guide can lead one group per time slot. However, the same guide can accompany different groups if their visiting times do not overlap. Therefore, the minimum number of guides required is equal to the maximum number of groups visiting during the same time slot. In mathematical terms, if we define s[i] as the number of groups visiting in slot i, then the answer is:
Your task is to compute this minimum number of guides needed for all groups.
inputFormat
The first line contains an integer n (1 \(\le n \le 1000\)), the number of visitor groups. The following n lines each contain a string of length 7 consisting only of characters '0' and '1', representing the visitation schedule for that group.
outputFormat
Output a single integer, the minimum number of guides required.
## sample2
0110001
1000100
1
</p>