1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000100000000000000000
<1001911 bytes omitted>
用户输出
999
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#49229 | #1253. 开课通知 | Wrong Answer | 30 | 868 ms | 18384 K | C++ / 880 B | 软件82-高欣源 | 2021-06-01 0:16:19 |
#include <bits/stdc++.h>
using namespace std;
int n;
int m;
vector<int> nums[100005];
vector<int> arr;
bool nums1[100005];
vector<int> mm[1000005];
int gg[1000005];
void dfs(int k);
int main() {
cin >> n >> m;
for (int i = 0; i < n; i++) {
string a;
cin >> a;
for (int j = 0; j < a.length(); j++) {
if (a[j] == '1') {
mm[j].push_back(i);
gg[j]++;
nums[i].push_back(1);
} else {
nums[i].push_back(0);
}
}
}
for (int i = 0; i < m; i++) {
if (mm[i].size() == 1) {
dfs(mm[i][0]);
break;
}
}
int ou = 0;
for (int i = 0; i < n; i++) {
if (nums1[i] == false) {
ou++;
}
}
cout << ou;
}
void dfs(int k) {
nums1[k] = true;
for (int i = 0; i < nums[k].size(); i++) {
if (nums[k][i] == 1) {
gg[i]--;
if (gg[i] == 1) {
for (int j = 0; j < mm[i].size(); j++) {
if (nums1[mm[i][j]] == false) {
dfs(mm[i][j]);
}
}
}
}
}
}
1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000100000000000000000
<1001911 bytes omitted>
用户输出
999
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1001911 bytes omitted>
用户输出
999
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1001911 bytes omitted>
用户输出
999
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000000000000010000000
<1001911 bytes omitted>
用户输出
999
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1001911 bytes omitted>
用户输出
999
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000000000000010000000
<1001911 bytes omitted>
用户输出
999
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1001911 bytes omitted>
用户输出
999
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
<1001911 bytes omitted>
用户输出
999
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
1000 1000
00000000000000000000000000000000000000000100000000000000000000000000000000000000000000000
<1001911 bytes omitted>
用户输出
1000
系统信息
Exited with return code 0
1000 1000
00000000000000010000000000000000000000000000000000000000000000000000000000000000000000000
<1001911 bytes omitted>
用户输出
999
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
10000 10
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
000000
<119910 bytes omitted>
用户输出
9999
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
10000 10
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
000000
<119910 bytes omitted>
用户输出
9999
Special Judge 信息
Files user_out and answer differ
系统信息
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>
用户输出
4999
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
5000 200
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>
用户输出
4999
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
5000 200
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>
用户输出
4999
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
5000 200
000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>
用户输出
4999
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
5000 200
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>
用户输出
4999
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
5000 200
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>
用户输出
4999
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
5000 200
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>
用户输出
4999
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
5000 200
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>
用户输出
4999
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
5000 200
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>
用户输出
4999
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0