Submission #143601

# Submission time Handle Problem Language Result Execution time Memory
143601 2019-08-14T17:48:18 Z kdh9949 Vision Program (IOI19_vision) C++17
32 / 100
6 ms 2036 KB
#include "vision.h"
using namespace std;

#define pb push_back

const int N = 405;

int xpy[N], xmy[N], a[N], b[N];
vector<int> pv[N], mv[N], av[N], bv[N], v;

void construct_network(int H, int W, int K) {
	for(int i = 0; i < H; i++) for(int j = 0; j < W; j++){
		pv[i + j].pb(i * W + j);
		mv[H - 1 - i + j].pb(i * W + j);
	}
	for(int i = 0; i <= H + W - 2; i++){
		xpy[i] = add_or(pv[i]);
		xmy[i] = add_or(mv[i]);
	}
	for(int i = 0; i <= H + W - 2; i++) for(int j = i + 1; j <= H + W - 2; j++){
		vector<int> t(2);
		t[0] = xpy[i]; t[1] = xpy[j];
		av[j - i].pb(add_and(t));
		t[0] = xmy[i]; t[1] = xmy[j];
		bv[j - i].pb(add_and(t));
	}
	for(int i = 1; i <= H + W - 2; i++){
		a[i] = add_or(av[i]);
		b[i] = add_or(bv[i]);
	}
	for(int i = K + 1; i <= H + W - 2; i++){
		v.push_back(add_not(a[i]));
		v.push_back(add_not(b[i]));
	}
	vector<int> t(2);
	t[0] = a[K]; t[1] = b[K];
	v.push_back(add_or(t));
	add_and(v);
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
4 Correct 2 ms 348 KB Output is correct
5 Correct 2 ms 376 KB Output is correct
6 Correct 2 ms 376 KB Output is correct
7 Correct 2 ms 376 KB Output is correct
8 Correct 2 ms 376 KB Output is correct
9 Correct 2 ms 376 KB Output is correct
10 Correct 2 ms 376 KB Output is correct
11 Correct 2 ms 376 KB Output is correct
12 Correct 2 ms 376 KB Output is correct
13 Correct 2 ms 376 KB Output is correct
14 Correct 2 ms 376 KB Output is correct
15 Correct 2 ms 376 KB Output is correct
16 Correct 2 ms 380 KB Output is correct
17 Correct 2 ms 376 KB Output is correct
18 Correct 2 ms 380 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
4 Correct 2 ms 348 KB Output is correct
5 Correct 2 ms 376 KB Output is correct
6 Correct 2 ms 376 KB Output is correct
7 Correct 2 ms 376 KB Output is correct
8 Correct 2 ms 376 KB Output is correct
9 Correct 2 ms 376 KB Output is correct
10 Correct 2 ms 376 KB Output is correct
11 Correct 2 ms 376 KB Output is correct
12 Correct 2 ms 376 KB Output is correct
13 Correct 2 ms 376 KB Output is correct
14 Correct 2 ms 376 KB Output is correct
15 Correct 2 ms 376 KB Output is correct
16 Correct 2 ms 380 KB Output is correct
17 Correct 2 ms 376 KB Output is correct
18 Correct 2 ms 380 KB Output is correct
19 Correct 2 ms 376 KB Output is correct
20 Correct 2 ms 376 KB Output is correct
21 Correct 2 ms 376 KB Output is correct
22 Correct 2 ms 376 KB Output is correct
23 Correct 2 ms 376 KB Output is correct
24 Correct 2 ms 376 KB Output is correct
25 Correct 2 ms 376 KB Output is correct
26 Correct 2 ms 376 KB Output is correct
27 Correct 2 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
4 Correct 2 ms 348 KB Output is correct
5 Correct 2 ms 376 KB Output is correct
6 Correct 2 ms 376 KB Output is correct
7 Correct 2 ms 376 KB Output is correct
8 Correct 2 ms 376 KB Output is correct
9 Correct 2 ms 376 KB Output is correct
10 Correct 2 ms 376 KB Output is correct
11 Correct 2 ms 376 KB Output is correct
12 Correct 2 ms 376 KB Output is correct
13 Correct 2 ms 376 KB Output is correct
14 Correct 2 ms 376 KB Output is correct
15 Correct 2 ms 376 KB Output is correct
16 Correct 2 ms 380 KB Output is correct
17 Correct 2 ms 376 KB Output is correct
18 Correct 2 ms 380 KB Output is correct
19 Correct 2 ms 376 KB Output is correct
20 Correct 2 ms 376 KB Output is correct
21 Correct 2 ms 376 KB Output is correct
22 Correct 2 ms 376 KB Output is correct
23 Correct 2 ms 376 KB Output is correct
24 Correct 2 ms 376 KB Output is correct
25 Correct 2 ms 376 KB Output is correct
26 Correct 2 ms 376 KB Output is correct
27 Correct 2 ms 376 KB Output is correct
28 Correct 5 ms 760 KB Output is correct
29 Correct 2 ms 376 KB Output is correct
30 Correct 3 ms 504 KB Output is correct
31 Correct 4 ms 632 KB Output is correct
32 Correct 4 ms 632 KB Output is correct
33 Correct 5 ms 760 KB Output is correct
34 Correct 4 ms 632 KB Output is correct
35 Correct 5 ms 632 KB Output is correct
36 Correct 5 ms 760 KB Output is correct
37 Correct 5 ms 760 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
4 Correct 2 ms 348 KB Output is correct
5 Correct 2 ms 376 KB Output is correct
6 Correct 2 ms 376 KB Output is correct
7 Correct 2 ms 376 KB Output is correct
8 Correct 2 ms 376 KB Output is correct
9 Correct 2 ms 376 KB Output is correct
10 Correct 2 ms 376 KB Output is correct
11 Correct 2 ms 376 KB Output is correct
12 Correct 2 ms 376 KB Output is correct
13 Correct 2 ms 376 KB Output is correct
14 Correct 2 ms 376 KB Output is correct
15 Correct 2 ms 376 KB Output is correct
16 Correct 2 ms 380 KB Output is correct
17 Correct 2 ms 376 KB Output is correct
18 Correct 2 ms 380 KB Output is correct
19 Correct 2 ms 376 KB Output is correct
20 Correct 2 ms 376 KB Output is correct
21 Correct 2 ms 376 KB Output is correct
22 Correct 2 ms 376 KB Output is correct
23 Correct 2 ms 376 KB Output is correct
24 Correct 2 ms 376 KB Output is correct
25 Correct 2 ms 376 KB Output is correct
26 Correct 2 ms 376 KB Output is correct
27 Correct 2 ms 376 KB Output is correct
28 Correct 5 ms 760 KB Output is correct
29 Correct 2 ms 376 KB Output is correct
30 Correct 3 ms 504 KB Output is correct
31 Correct 4 ms 632 KB Output is correct
32 Correct 4 ms 632 KB Output is correct
33 Correct 5 ms 760 KB Output is correct
34 Correct 4 ms 632 KB Output is correct
35 Correct 5 ms 632 KB Output is correct
36 Correct 5 ms 760 KB Output is correct
37 Correct 5 ms 760 KB Output is correct
38 Incorrect 5 ms 1396 KB WA in grader: Too many instructions
39 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 1140 KB WA in grader: Too many instructions
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 292 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Incorrect 5 ms 1268 KB WA in grader: Too many instructions
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 6 ms 2036 KB WA in grader: Too many instructions
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
4 Correct 2 ms 348 KB Output is correct
5 Correct 2 ms 376 KB Output is correct
6 Correct 2 ms 376 KB Output is correct
7 Correct 2 ms 376 KB Output is correct
8 Correct 2 ms 376 KB Output is correct
9 Correct 2 ms 376 KB Output is correct
10 Correct 2 ms 376 KB Output is correct
11 Correct 2 ms 376 KB Output is correct
12 Correct 2 ms 376 KB Output is correct
13 Correct 2 ms 376 KB Output is correct
14 Correct 2 ms 376 KB Output is correct
15 Correct 2 ms 376 KB Output is correct
16 Correct 2 ms 380 KB Output is correct
17 Correct 2 ms 376 KB Output is correct
18 Correct 2 ms 380 KB Output is correct
19 Correct 2 ms 376 KB Output is correct
20 Correct 2 ms 376 KB Output is correct
21 Correct 2 ms 376 KB Output is correct
22 Correct 2 ms 376 KB Output is correct
23 Correct 2 ms 376 KB Output is correct
24 Correct 2 ms 376 KB Output is correct
25 Correct 2 ms 376 KB Output is correct
26 Correct 2 ms 376 KB Output is correct
27 Correct 2 ms 376 KB Output is correct
28 Correct 5 ms 760 KB Output is correct
29 Correct 2 ms 376 KB Output is correct
30 Correct 3 ms 504 KB Output is correct
31 Correct 4 ms 632 KB Output is correct
32 Correct 4 ms 632 KB Output is correct
33 Correct 5 ms 760 KB Output is correct
34 Correct 4 ms 632 KB Output is correct
35 Correct 5 ms 632 KB Output is correct
36 Correct 5 ms 760 KB Output is correct
37 Correct 5 ms 760 KB Output is correct
38 Incorrect 5 ms 1396 KB WA in grader: Too many instructions
39 Halted 0 ms 0 KB -