1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000100000000000000000
<1001911 bytes omitted>
用户输出
106
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#49342 | #1253. 开课通知 | Wrong Answer | 10 | 1024 ms | 23940 K | C++ 11 / 1.3 K | cgyz | 2021-06-28 16:29:27 |
#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int n, m;
vector<int> clas[N];
void init(vector<int> &k, string n, int i) {
int idx = 1;
for (int j = 0; j < n.size(); j++) {
if (n[j] == '1') {
k.push_back(idx);
clas[idx].push_back(i);
}
idx++;
}
}
int main() {
cin >> n >> m;
vector<int> stu[N];
for (int i = 0; i < n; i++) {
string a;
cin >> a;
init(stu[i], a, i);
}
for (int i = 1; i <= n; i++) {
bool flag = false;
for (int j = 1; j <= m; j++) {
if (clas[j].size() == 1) {
// cout<<j<<"!"<<endl;
int tem = clas[j][0];
flag = true;
// cout<<stu[tem].size();
for (int l = 0; l < stu[tem].size(); l++) {
vector<int>::iterator it = find(clas[stu[tem][l]].begin(), clas[stu[tem][l]].end(), tem);
if (it != clas[stu[tem][l]].end()) {
clas[stu[tem][l]].erase(it);
}
}
}
}
if (flag == false)
break;
}
int cnt = 0;
for (int i = 1; i <= m; i++)
if (clas[i].size() != 0)
cnt++;
cout << cnt;
}
1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000100000000000000000
<1001911 bytes omitted>
用户输出
106
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1001911 bytes omitted>
用户输出
171
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1001911 bytes omitted>
用户输出
490
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000000000000010000000
<1001911 bytes omitted>
用户输出
886
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1001911 bytes omitted>
用户输出
953
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000000000000010000000
<1001911 bytes omitted>
用户输出
984
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1001911 bytes omitted>
用户输出
992
系统信息
Exited with return code 0
1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
<1001911 bytes omitted>
用户输出
993
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>
用户输出
998
系统信息
Exited with return code 0
10000 10
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
000000
<119910 bytes omitted>
用户输出
5
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>
用户输出
5
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>
用户输出
10
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>
用户输出
9
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>
用户输出
10
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>
用户输出
10
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>
用户输出
10
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>
用户输出
10
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
10000 10
0000000000
0000000000
1000000000
0000000000
0000000000
0000000000
0000000000
000000
<119910 bytes omitted>
用户输出
10
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>
用户输出
10
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
5000 200
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>
用户输出
8
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
5000 200
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>
用户输出
54
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
5000 200
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>
用户输出
97
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
5000 200
000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>
用户输出
111
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
5000 200
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>
用户输出
145
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
5000 200
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>
用户输出
157
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
5000 200
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>
用户输出
176
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
5000 200
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>
用户输出
177
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
5000 200
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>
用户输出
185
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0