Submission #418368

# Submission time Handle Problem Language Result Execution time Memory
418368 2021-06-05T10:21:47 Z dxz05 Vision Program (IOI19_vision) C++14
44 / 100
212 ms 7788 KB
#include "vision.h"
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const int MAXN = 2e5 + 3e2;

vector<int> vv[MAXN];

void construct_network(int H, int W, int K) {
	vector<int> Ns;

	for (int i = 0; i < H; i++){
	    for (int j = 0; j < W; j++){
	        Ns = {i * W + j};
	        vv[i * W + j].push_back(add_or(Ns));
	        Ns.clear();
	        for (int x = 0; x < H; x++){
	            for (int y = 0; y < W; y++){
	                if (abs(x - i) + abs(y - j) != K) continue;

	                Ns.push_back(x * W + y);

	            }
	        }

            if (!Ns.empty()) vv[i * W + j].push_back(add_or(Ns));

	    }
	}

	Ns.clear();
	for (int i = 0; i < H * W; i++){
	    if (vv[i].size() == 2) Ns.push_back(add_and(vv[i]));
	}

    add_or(Ns);
}
# Verdict Execution time Memory Grader output
1 Correct 4 ms 4940 KB Output is correct
2 Correct 4 ms 5004 KB Output is correct
3 Correct 4 ms 4996 KB Output is correct
4 Correct 3 ms 5004 KB Output is correct
5 Correct 4 ms 4940 KB Output is correct
6 Correct 3 ms 4940 KB Output is correct
7 Correct 4 ms 4996 KB Output is correct
8 Correct 3 ms 4940 KB Output is correct
9 Correct 3 ms 4940 KB Output is correct
10 Correct 4 ms 4952 KB Output is correct
11 Correct 3 ms 4992 KB Output is correct
12 Correct 3 ms 5004 KB Output is correct
13 Correct 3 ms 4940 KB Output is correct
14 Correct 3 ms 5000 KB Output is correct
15 Correct 3 ms 4996 KB Output is correct
16 Correct 3 ms 4940 KB Output is correct
17 Correct 3 ms 4940 KB Output is correct
18 Correct 3 ms 4900 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 4940 KB Output is correct
2 Correct 4 ms 5004 KB Output is correct
3 Correct 4 ms 4996 KB Output is correct
4 Correct 3 ms 5004 KB Output is correct
5 Correct 4 ms 4940 KB Output is correct
6 Correct 3 ms 4940 KB Output is correct
7 Correct 4 ms 4996 KB Output is correct
8 Correct 3 ms 4940 KB Output is correct
9 Correct 3 ms 4940 KB Output is correct
10 Correct 4 ms 4952 KB Output is correct
11 Correct 3 ms 4992 KB Output is correct
12 Correct 3 ms 5004 KB Output is correct
13 Correct 3 ms 4940 KB Output is correct
14 Correct 3 ms 5000 KB Output is correct
15 Correct 3 ms 4996 KB Output is correct
16 Correct 3 ms 4940 KB Output is correct
17 Correct 3 ms 4940 KB Output is correct
18 Correct 3 ms 4900 KB Output is correct
19 Correct 4 ms 4940 KB Output is correct
20 Correct 3 ms 4940 KB Output is correct
21 Correct 4 ms 4940 KB Output is correct
22 Correct 4 ms 5000 KB Output is correct
23 Correct 4 ms 4940 KB Output is correct
24 Correct 4 ms 5000 KB Output is correct
25 Correct 5 ms 4996 KB Output is correct
26 Correct 4 ms 4940 KB Output is correct
27 Correct 4 ms 4940 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 4940 KB Output is correct
2 Correct 4 ms 5004 KB Output is correct
3 Correct 4 ms 4996 KB Output is correct
4 Correct 3 ms 5004 KB Output is correct
5 Correct 4 ms 4940 KB Output is correct
6 Correct 3 ms 4940 KB Output is correct
7 Correct 4 ms 4996 KB Output is correct
8 Correct 3 ms 4940 KB Output is correct
9 Correct 3 ms 4940 KB Output is correct
10 Correct 4 ms 4952 KB Output is correct
11 Correct 3 ms 4992 KB Output is correct
12 Correct 3 ms 5004 KB Output is correct
13 Correct 3 ms 4940 KB Output is correct
14 Correct 3 ms 5000 KB Output is correct
15 Correct 3 ms 4996 KB Output is correct
16 Correct 3 ms 4940 KB Output is correct
17 Correct 3 ms 4940 KB Output is correct
18 Correct 3 ms 4900 KB Output is correct
19 Correct 4 ms 4940 KB Output is correct
20 Correct 3 ms 4940 KB Output is correct
21 Correct 4 ms 4940 KB Output is correct
22 Correct 4 ms 5000 KB Output is correct
23 Correct 4 ms 4940 KB Output is correct
24 Correct 4 ms 5000 KB Output is correct
25 Correct 5 ms 4996 KB Output is correct
26 Correct 4 ms 4940 KB Output is correct
27 Correct 4 ms 4940 KB Output is correct
28 Correct 9 ms 5452 KB Output is correct
29 Correct 3 ms 4940 KB Output is correct
30 Correct 3 ms 4940 KB Output is correct
31 Correct 4 ms 4940 KB Output is correct
32 Correct 5 ms 5068 KB Output is correct
33 Correct 6 ms 5264 KB Output is correct
34 Correct 9 ms 5452 KB Output is correct
35 Correct 8 ms 5324 KB Output is correct
36 Correct 6 ms 5068 KB Output is correct
37 Correct 6 ms 5068 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 4940 KB Output is correct
2 Correct 4 ms 5004 KB Output is correct
3 Correct 4 ms 4996 KB Output is correct
4 Correct 3 ms 5004 KB Output is correct
5 Correct 4 ms 4940 KB Output is correct
6 Correct 3 ms 4940 KB Output is correct
7 Correct 4 ms 4996 KB Output is correct
8 Correct 3 ms 4940 KB Output is correct
9 Correct 3 ms 4940 KB Output is correct
10 Correct 4 ms 4952 KB Output is correct
11 Correct 3 ms 4992 KB Output is correct
12 Correct 3 ms 5004 KB Output is correct
13 Correct 3 ms 4940 KB Output is correct
14 Correct 3 ms 5000 KB Output is correct
15 Correct 3 ms 4996 KB Output is correct
16 Correct 3 ms 4940 KB Output is correct
17 Correct 3 ms 4940 KB Output is correct
18 Correct 3 ms 4900 KB Output is correct
19 Correct 4 ms 4940 KB Output is correct
20 Correct 3 ms 4940 KB Output is correct
21 Correct 4 ms 4940 KB Output is correct
22 Correct 4 ms 5000 KB Output is correct
23 Correct 4 ms 4940 KB Output is correct
24 Correct 4 ms 5000 KB Output is correct
25 Correct 5 ms 4996 KB Output is correct
26 Correct 4 ms 4940 KB Output is correct
27 Correct 4 ms 4940 KB Output is correct
28 Correct 9 ms 5452 KB Output is correct
29 Correct 3 ms 4940 KB Output is correct
30 Correct 3 ms 4940 KB Output is correct
31 Correct 4 ms 4940 KB Output is correct
32 Correct 5 ms 5068 KB Output is correct
33 Correct 6 ms 5264 KB Output is correct
34 Correct 9 ms 5452 KB Output is correct
35 Correct 8 ms 5324 KB Output is correct
36 Correct 6 ms 5068 KB Output is correct
37 Correct 6 ms 5068 KB Output is correct
38 Incorrect 69 ms 7788 KB WA in grader: Too many instructions
39 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 4 ms 4940 KB Output is correct
2 Correct 4 ms 4940 KB Output is correct
3 Correct 4 ms 4940 KB Output is correct
4 Correct 4 ms 4940 KB Output is correct
5 Correct 4 ms 4940 KB Output is correct
6 Correct 4 ms 4940 KB Output is correct
7 Correct 4 ms 4940 KB Output is correct
8 Correct 4 ms 4940 KB Output is correct
9 Correct 4 ms 5068 KB Output is correct
10 Correct 4 ms 4940 KB Output is correct
11 Correct 4 ms 4940 KB Output is correct
12 Correct 4 ms 4940 KB Output is correct
13 Correct 4 ms 4940 KB Output is correct
14 Correct 3 ms 4940 KB Output is correct
15 Correct 4 ms 4940 KB Output is correct
16 Correct 4 ms 5068 KB Output is correct
17 Correct 4 ms 5000 KB Output is correct
18 Correct 4 ms 4940 KB Output is correct
19 Correct 4 ms 5000 KB Output is correct
20 Correct 4 ms 4940 KB Output is correct
21 Correct 3 ms 4940 KB Output is correct
22 Correct 3 ms 4996 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 4940 KB Output is correct
2 Correct 4 ms 4972 KB Output is correct
3 Correct 22 ms 5832 KB Output is correct
4 Correct 36 ms 6812 KB Output is correct
5 Correct 32 ms 6364 KB Output is correct
6 Correct 22 ms 5676 KB Output is correct
7 Correct 19 ms 5272 KB Output is correct
8 Incorrect 37 ms 5824 KB WA in grader: Too many instructions
9 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 212 ms 5888 KB WA in grader: Too many instructions
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 4 ms 4940 KB Output is correct
2 Correct 4 ms 5004 KB Output is correct
3 Correct 4 ms 4996 KB Output is correct
4 Correct 3 ms 5004 KB Output is correct
5 Correct 4 ms 4940 KB Output is correct
6 Correct 3 ms 4940 KB Output is correct
7 Correct 4 ms 4996 KB Output is correct
8 Correct 3 ms 4940 KB Output is correct
9 Correct 3 ms 4940 KB Output is correct
10 Correct 4 ms 4952 KB Output is correct
11 Correct 3 ms 4992 KB Output is correct
12 Correct 3 ms 5004 KB Output is correct
13 Correct 3 ms 4940 KB Output is correct
14 Correct 3 ms 5000 KB Output is correct
15 Correct 3 ms 4996 KB Output is correct
16 Correct 3 ms 4940 KB Output is correct
17 Correct 3 ms 4940 KB Output is correct
18 Correct 3 ms 4900 KB Output is correct
19 Correct 4 ms 4940 KB Output is correct
20 Correct 3 ms 4940 KB Output is correct
21 Correct 4 ms 4940 KB Output is correct
22 Correct 4 ms 5000 KB Output is correct
23 Correct 4 ms 4940 KB Output is correct
24 Correct 4 ms 5000 KB Output is correct
25 Correct 5 ms 4996 KB Output is correct
26 Correct 4 ms 4940 KB Output is correct
27 Correct 4 ms 4940 KB Output is correct
28 Correct 9 ms 5452 KB Output is correct
29 Correct 3 ms 4940 KB Output is correct
30 Correct 3 ms 4940 KB Output is correct
31 Correct 4 ms 4940 KB Output is correct
32 Correct 5 ms 5068 KB Output is correct
33 Correct 6 ms 5264 KB Output is correct
34 Correct 9 ms 5452 KB Output is correct
35 Correct 8 ms 5324 KB Output is correct
36 Correct 6 ms 5068 KB Output is correct
37 Correct 6 ms 5068 KB Output is correct
38 Incorrect 69 ms 7788 KB WA in grader: Too many instructions
39 Halted 0 ms 0 KB -