编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#49232 #1253. 开课通知 Wrong Answer 30 852 ms 18372 K C++ / 992 B 软件82-高欣源 2021-06-01 14:25:59
显示原始代码
#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];
vector<int> cc;
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 < m; i++) {
        if (nums[k][i] == 1) {
            gg[i]--;
            if (gg[i] == 1) {
                cc.push_back(i);
            }
        }
    }
    if (cc.size() != 0) {
        for (int z = 0; z < cc.size(); z++) {
            for (int j = 0; j < mm[cc[z]].size(); j++) {
                if (nums1[mm[cc[z]][j]] == false) {
                    dfs(mm[cc[z]][j]);
                }
            }
        }
    }
    cc.clear();
}
子任务 #1
Wrong Answer
得分:30
测试点 #1
Wrong Answer
得分:0
用时:34 ms
内存:17280 KiB

输入文件(1.in

1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000100000000000000000
<1001911 bytes omitted>

答案文件(1.out

553

用户输出

999

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #2
Wrong Answer
得分:0
用时:34 ms
内存:17268 KiB

输入文件(2.in

1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1001911 bytes omitted>

答案文件(2.out

390

用户输出

999

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #3
Wrong Answer
得分:0
用时:33 ms
内存:17308 KiB

输入文件(3.in

1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1001911 bytes omitted>

答案文件(3.out

570

用户输出

999

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #4
Wrong Answer
得分:0
用时:33 ms
内存:17268 KiB

输入文件(4.in

1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000000000000010000000
<1001911 bytes omitted>

答案文件(4.out

898

用户输出

999

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #5
Wrong Answer
得分:0
用时:34 ms
内存:17268 KiB

输入文件(5.in

1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1001911 bytes omitted>

答案文件(5.out

959

用户输出

999

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #6
Wrong Answer
得分:0
用时:34 ms
内存:17284 KiB

输入文件(6.in

1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000000000000010000000
<1001911 bytes omitted>

答案文件(6.out

985

用户输出

999

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #7
Wrong Answer
得分:0
用时:34 ms
内存:17288 KiB

输入文件(7.in

1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1001911 bytes omitted>

答案文件(7.out

992

用户输出

999

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #8
Wrong Answer
得分:0
用时:33 ms
内存:17272 KiB

输入文件(8.in

1000 1000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
<1001911 bytes omitted>

答案文件(8.out

995

用户输出

999

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #9
Accepted
得分:100
用时:34 ms
内存:17396 KiB

输入文件(9.in

1000 1000
00000000000000000000000000000000000000000100000000000000000000000000000000000000000000000
<1001911 bytes omitted>

答案文件(9.out

1000

用户输出

1000

系统信息

Exited with return code 0
测试点 #10
Wrong Answer
得分:0
用时:34 ms
内存:17396 KiB

输入文件(10.in

1000 1000
00000000000000010000000000000000000000000000000000000000000000000000000000000000000000000
<1001911 bytes omitted>

答案文件(10.out

998

用户输出

999

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #11
Wrong Answer
得分:0
用时:16 ms
内存:13968 KiB

输入文件(11.in

10000 10
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
000000
<119910 bytes omitted>

答案文件(11.out

9998

用户输出

9999

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #12
Wrong Answer
得分:0
用时:16 ms
内存:14068 KiB

输入文件(12.in

10000 10
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
000000
<119910 bytes omitted>

答案文件(12.out

9997

用户输出

9999

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #13
Accepted
得分:100
用时:16 ms
内存:13956 KiB

输入文件(13.in

10000 10
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
000000
<119910 bytes omitted>

答案文件(13.out

10000

用户输出

10000

系统信息

Exited with return code 0
测试点 #14
Accepted
得分:100
用时:16 ms
内存:14068 KiB

输入文件(14.in

10000 10
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
000000
<119910 bytes omitted>

答案文件(14.out

9999

用户输出

9999

系统信息

Exited with return code 0
测试点 #15
Accepted
得分:100
用时:16 ms
内存:14068 KiB

输入文件(15.in

10000 10
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
000000
<119910 bytes omitted>

答案文件(15.out

10000

用户输出

10000

系统信息

Exited with return code 0
测试点 #16
Accepted
得分:100
用时:16 ms
内存:14068 KiB

输入文件(16.in

10000 10
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
000000
<119910 bytes omitted>

答案文件(16.out

10000

用户输出

10000

系统信息

Exited with return code 0
测试点 #17
Accepted
得分:100
用时:16 ms
内存:14068 KiB

输入文件(17.in

10000 10
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
000000
<119910 bytes omitted>

答案文件(17.out

10000

用户输出

10000

系统信息

Exited with return code 0
测试点 #18
Accepted
得分:100
用时:16 ms
内存:14004 KiB

输入文件(18.in

10000 10
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
000000
<119910 bytes omitted>

答案文件(18.out

10000

用户输出

10000

系统信息

Exited with return code 0
测试点 #19
Accepted
得分:100
用时:16 ms
内存:14068 KiB

输入文件(19.in

10000 10
0000000000
0000000000
1000000000
0000000000
0000000000
0000000000
0000000000
000000
<119910 bytes omitted>

答案文件(19.out

10000

用户输出

10000

系统信息

Exited with return code 0
测试点 #20
Accepted
得分:100
用时:16 ms
内存:14016 KiB

输入文件(20.in

10000 10
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
0000000000
000000
<119910 bytes omitted>

答案文件(20.out

10000

用户输出

10000

系统信息

Exited with return code 0
测试点 #21
Wrong Answer
得分:0
用时:37 ms
内存:18292 KiB

输入文件(21.in

5000 200
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>

答案文件(21.out

4930

用户输出

4999

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #22
Wrong Answer
得分:0
用时:36 ms
内存:18328 KiB

输入文件(22.in

5000 200
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>

答案文件(22.out

4922

用户输出

4999

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #23
Wrong Answer
得分:0
用时:35 ms
内存:18292 KiB

输入文件(23.in

5000 200
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>

答案文件(23.out

4940

用户输出

4999

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #24
Wrong Answer
得分:0
用时:35 ms
内存:18292 KiB

输入文件(24.in

5000 200
000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>

答案文件(24.out

4944

用户输出

4999

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #25
Wrong Answer
得分:0
用时:35 ms
内存:18352 KiB

输入文件(25.in

5000 200
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>

答案文件(25.out

4960

用户输出

4999

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #26
Wrong Answer
得分:0
用时:36 ms
内存:18316 KiB

输入文件(26.in

5000 200
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>

答案文件(26.out

4967

用户输出

4999

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #27
Wrong Answer
得分:0
用时:36 ms
内存:18308 KiB

输入文件(27.in

5000 200
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>

答案文件(27.out

4980

用户输出

4999

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #28
Wrong Answer
得分:0
用时:35 ms
内存:18268 KiB

输入文件(28.in

5000 200
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>

答案文件(28.out

4980

用户输出

4999

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #29
Wrong Answer
得分:0
用时:35 ms
内存:18372 KiB

输入文件(29.in

5000 200
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>

答案文件(29.out

4987

用户输出

4999

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #30
Wrong Answer
得分:0
用时:35 ms
内存:18292 KiB

输入文件(30.in

5000 200
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<1009910 bytes omitted>

答案文件(30.out

4992

用户输出

4999

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0