#C7150. Maximum Club Meeting Attendance
Maximum Club Meeting Attendance
Maximum Club Meeting Attendance
You are given the availability schedules of club members for a meeting. Each member provides the list of days (represented as integers from 1 to 7, where 1 corresponds to Monday and 7 to Sunday) on which they are available. The goal is to determine the day on which the maximum number of members can attend. Formally, if you denote by (a_{ij}) an indicator that member (i) is available on day (j), then you need to compute (\max_{1 \le j \le 7} \sum_{i=1}^{n} a_{ij}).
The input is given from standard input. The first line contains an integer (n) representing the number of club members. The following (n) lines each start with an integer (k) (the number of days the member is available), followed by (k) integers which are the days the member is available. The output should be written to standard output: a single integer representing the maximum number of members that can attend a meeting on a day.
inputFormat
The first line contains an integer (n) (the number of club members). Each of the next (n) lines contains an integer (k) followed by (k) space-separated integers, where each integer is a day (from 1 to 7) on which the member is available.
outputFormat
Output a single integer: the maximum number of members available on the same day.## sample
4
3 1 3 5
2 2 3
1 1
2 5 6
2