1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000100000000000000000
<1001911 bytes omitted>
用户输出
553
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#48025 | #1253. 开课通知 | Accepted | 100 | 990 ms | 25740 K | C++ 17 / 725 B | Diorvh | 2021-05-10 19:11:09 |
#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 2;
int a[N];
int n, m;
string s[N];
int check() {
for (int i = 1; i <= m; ++i)
if (a[i] == 1)
return i;
return 0;
}
int main() {
cin >> n >> m;
for (int i = 1; i <= n; ++i) {
cin >> s[i];
for (int j = 1; j <= m; ++j) a[j] += s[i][j - 1] - '0';
}
int c;
int ans = n;
while (c = check()) {
--ans;
for (int i = 1; i <= n; ++i)
if (s[i][c - 1] == '1') {
for (int j = 1; j <= m; ++j) a[j] -= s[i][j - 1] - '0', s[i][j - 1] = '0';
break;
}
}
cout << ans << endl;
return 0;
}
1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000100000000000000000
<1001911 bytes omitted>
用户输出
553
系统信息
Exited with return code 0
1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1001911 bytes omitted>
用户输出
390
系统信息
Exited with return code 0
1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1001911 bytes omitted>
用户输出
570
系统信息
Exited with return code 0
1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000000000000010000000
<1001911 bytes omitted>
用户输出
898
系统信息
Exited with return code 0
1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1001911 bytes omitted>
用户输出
959
系统信息
Exited with return code 0
1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000000000000010000000
<1001911 bytes omitted>
用户输出
985
系统信息
Exited with return code 0
1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1001911 bytes omitted>
用户输出
992
系统信息
Exited with return code 0
1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
<1001911 bytes omitted>
用户输出
995
系统信息
Exited with return code 0
1000 1000
00000000000000000000000000000000000000000100000000000000000000000000000000000000000000000
<1001911 bytes omitted>
用户输出
1000
系统信息
Exited with return code 0
1000 1000
00000000000000010000000000000000000000000000000000000000000000000000000000000000000000000
<1001911 bytes omitted>
用户输出
998
系统信息
Exited with return code 0
10000 10
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
000000
<119910 bytes omitted>
用户输出
9998
系统信息
Exited with return code 0
10000 10
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
000000
<119910 bytes omitted>
用户输出
9997
系统信息
Exited with return code 0
10000 10
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
000000
<119910 bytes omitted>
用户输出
10000
系统信息
Exited with return code 0
10000 10
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
000000
<119910 bytes omitted>
用户输出
9999
系统信息
Exited with return code 0
10000 10
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
000000
<119910 bytes omitted>
用户输出
10000
系统信息
Exited with return code 0
10000 10
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
000000
<119910 bytes omitted>
用户输出
10000
系统信息
Exited with return code 0
10000 10
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
000000
<119910 bytes omitted>
用户输出
10000
系统信息
Exited with return code 0
10000 10
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
000000
<119910 bytes omitted>
用户输出
10000
系统信息
Exited with return code 0
10000 10
0000000000
0000000000
1000000000
0000000000
0000000000
0000000000
0000000000
000000
<119910 bytes omitted>
用户输出
10000
系统信息
Exited with return code 0
10000 10
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
000000
<119910 bytes omitted>
用户输出
10000
系统信息
Exited with return code 0
5000 200
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>
用户输出
4930
系统信息
Exited with return code 0
5000 200
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>
用户输出
4922
系统信息
Exited with return code 0
5000 200
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>
用户输出
4940
系统信息
Exited with return code 0
5000 200
000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>
用户输出
4944
系统信息
Exited with return code 0
5000 200
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>
用户输出
4960
系统信息
Exited with return code 0
5000 200
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>
用户输出
4967
系统信息
Exited with return code 0
5000 200
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>
用户输出
4980
系统信息
Exited with return code 0
5000 200
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>
用户输出
4980
系统信息
Exited with return code 0
5000 200
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>
用户输出
4987
系统信息
Exited with return code 0