Problem G
On-Call Team
An IT company has formed an on-call team of software
engineers who will manage their backend services and make sure
that these services run without interruption. When services go
down, for each service that is down the on-call team must
dispatch one member who is familiar with that service to take
care of its issue. One team member can handle at most one
service at a time. The company wants to evaluate the robustness level of the on-call team, which is
defined as the maximum value
Input
The first line of input contains two integers
Each of the next
It is guaranteed that for each of the
Output
Output a single integer, which is the robustness level of the on-call team.
Sample Input 1 | Sample Output 1 |
---|---|
4 6 001101 111001 001110 100100 |
3 |
Sample Input 2 | Sample Output 2 |
---|---|
3 3 001 001 110 |
1 |