QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 2048 MB Total points: 100

#9057. 待命团队

Statistics

一家 IT 公司组建了一个软件工程师值班团队,负责管理后端服务并确保这些服务不间断运行。当服务宕机时,对于每一个宕机的服务,值班团队必须指派一名熟悉该服务的成员来处理问题。每位团队成员一次最多只能处理一项服务。公司希望评估值班团队的“稳健性水平”(robustness level),其定义为:能够同时处理任意 $k$ 个宕机服务时的最大 $k$ 值。

输入格式

第一行包含两个整数 $n$ ($1 \le n \le 3 \cdot 10^4$) 和 $m$ ($1 \le m \le 20$),其中 $n$ 是工程师的人数,$m$ 是后端服务的数量。

接下来的 $n$ 行,每行包含一个长度为 $m$ 的二进制字符串,描述了 $n$ 位软件工程师对 $m$ 项服务的熟悉程度。如果第 $i$ 行的第 $j$ 位数字为 $1$,则表示工程师 $i$ 熟悉服务 $j$,否则为 $0$。

保证对于每一项服务,至少有一位软件工程师熟悉它。

输出格式

输出一个整数,即值班团队的稳健性水平。

样例

样例输入 1

4 6
001101
111001
001110
100100

样例输出 1

3

样例输入 2

3 3
001
001
110

样例输出 2

1

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.