Submission #349177

# Submission time Handle Problem Language Result Execution time Memory
349177 2021-01-16T23:14:05 Z super_j6 Vision Program (IOI19_vision) C++14
100 / 100
56 ms 5372 KB
#include "vision.h"
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
using namespace std;
#define endl '\n'
#define ll long long
#define pi pair<int, int>
#define f first
#define s second
#define vi vector<int>
/*
vi a;

int add_not(int x){
	a.push_back(!a[x]);
	return a.size() - 1;
}

int add_and(vi v){
	a.push_back(1);
	for(int i : v) a.back() &= a[i];
	return a.size() - 1;
}

int add_or(vi v){
	a.push_back(0);
	if(*max_element(v.begin(), v.end()) > a.size()) exit(0);
	for(int i : v) a.back() |= a[i];
	return a.size() - 1;
}

int add_xor(vi v){
	a.push_back(0);
	for(int i : v) a.back() ^= a[i];
	return a.size() - 1;
}
*/
void construct_network(int n, int m, int k){
	vi v, vv, w;
	int d = n + m - 1, f[2], ff[2];
	for(int t = 0; t < 2; t++)
	for(int i = 0; i < d; i++){
		v.clear();
		for(int j = max(0, i + 1 - m); j < n && j <= i; j++){ 
			v.push_back(j * m + (t ? m + j - i - 1 : i - j));
		} 
		add_or(v), add_xor(v);
	}
	
	for(int t = 0; t < 2; t++){
		for(int i = 0; i < 2; i++){
			w.clear();
			for(int j = 0; j < d + t - k; j++){
				v.clear(), vv.clear();
				for(int l = 0; l <= k - t; l++){
					int x = n * m + 2 * (d * i + j + l);
					v.push_back(x), vv.push_back(x + 1);
				} 
				w.push_back(add_and({add_or(v), add_not(add_xor(vv))}));
			}
			ff[i] = add_or(w);
		}
		f[t] = add_and({ff[0], ff[1]});
	}
	
	add_and({f[0], add_not(f[1])});
}
/*
int main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	int n, m, k;
	cin >> n >> m >> k;
	
	a.resize(n * m);
	for(int i = 0; i < n; i++)
	for(int j = 0; j < m; j++){
		cin >> a[i * m + j];
	}

	construct_network(n, m, k);
	
	cout << a.back() << endl;
	
	return 0;
}
*/
# Verdict Execution time Memory Grader output
1 Correct 0 ms 364 KB Output is correct
2 Correct 0 ms 364 KB Output is correct
3 Correct 1 ms 384 KB Output is correct
4 Correct 1 ms 236 KB Output is correct
5 Correct 0 ms 364 KB Output is correct
6 Correct 1 ms 256 KB Output is correct
7 Correct 1 ms 384 KB Output is correct
8 Correct 1 ms 364 KB Output is correct
9 Correct 1 ms 364 KB Output is correct
10 Correct 1 ms 364 KB Output is correct
11 Correct 1 ms 364 KB Output is correct
12 Correct 1 ms 364 KB Output is correct
13 Correct 1 ms 364 KB Output is correct
14 Correct 1 ms 364 KB Output is correct
15 Correct 1 ms 364 KB Output is correct
16 Correct 1 ms 364 KB Output is correct
17 Correct 1 ms 364 KB Output is correct
18 Correct 1 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 364 KB Output is correct
2 Correct 0 ms 364 KB Output is correct
3 Correct 1 ms 384 KB Output is correct
4 Correct 1 ms 236 KB Output is correct
5 Correct 0 ms 364 KB Output is correct
6 Correct 1 ms 256 KB Output is correct
7 Correct 1 ms 384 KB Output is correct
8 Correct 1 ms 364 KB Output is correct
9 Correct 1 ms 364 KB Output is correct
10 Correct 1 ms 364 KB Output is correct
11 Correct 1 ms 364 KB Output is correct
12 Correct 1 ms 364 KB Output is correct
13 Correct 1 ms 364 KB Output is correct
14 Correct 1 ms 364 KB Output is correct
15 Correct 1 ms 364 KB Output is correct
16 Correct 1 ms 364 KB Output is correct
17 Correct 1 ms 364 KB Output is correct
18 Correct 1 ms 364 KB Output is correct
19 Correct 1 ms 364 KB Output is correct
20 Correct 1 ms 384 KB Output is correct
21 Correct 1 ms 384 KB Output is correct
22 Correct 1 ms 364 KB Output is correct
23 Correct 1 ms 364 KB Output is correct
24 Correct 1 ms 364 KB Output is correct
25 Correct 1 ms 364 KB Output is correct
26 Correct 1 ms 364 KB Output is correct
27 Correct 1 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 364 KB Output is correct
2 Correct 0 ms 364 KB Output is correct
3 Correct 1 ms 384 KB Output is correct
4 Correct 1 ms 236 KB Output is correct
5 Correct 0 ms 364 KB Output is correct
6 Correct 1 ms 256 KB Output is correct
7 Correct 1 ms 384 KB Output is correct
8 Correct 1 ms 364 KB Output is correct
9 Correct 1 ms 364 KB Output is correct
10 Correct 1 ms 364 KB Output is correct
11 Correct 1 ms 364 KB Output is correct
12 Correct 1 ms 364 KB Output is correct
13 Correct 1 ms 364 KB Output is correct
14 Correct 1 ms 364 KB Output is correct
15 Correct 1 ms 364 KB Output is correct
16 Correct 1 ms 364 KB Output is correct
17 Correct 1 ms 364 KB Output is correct
18 Correct 1 ms 364 KB Output is correct
19 Correct 1 ms 364 KB Output is correct
20 Correct 1 ms 384 KB Output is correct
21 Correct 1 ms 384 KB Output is correct
22 Correct 1 ms 364 KB Output is correct
23 Correct 1 ms 364 KB Output is correct
24 Correct 1 ms 364 KB Output is correct
25 Correct 1 ms 364 KB Output is correct
26 Correct 1 ms 364 KB Output is correct
27 Correct 1 ms 364 KB Output is correct
28 Correct 2 ms 492 KB Output is correct
29 Correct 1 ms 364 KB Output is correct
30 Correct 1 ms 384 KB Output is correct
31 Correct 1 ms 364 KB Output is correct
32 Correct 1 ms 364 KB Output is correct
33 Correct 2 ms 492 KB Output is correct
34 Correct 2 ms 492 KB Output is correct
35 Correct 2 ms 492 KB Output is correct
36 Correct 2 ms 384 KB Output is correct
37 Correct 1 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 364 KB Output is correct
2 Correct 0 ms 364 KB Output is correct
3 Correct 1 ms 384 KB Output is correct
4 Correct 1 ms 236 KB Output is correct
5 Correct 0 ms 364 KB Output is correct
6 Correct 1 ms 256 KB Output is correct
7 Correct 1 ms 384 KB Output is correct
8 Correct 1 ms 364 KB Output is correct
9 Correct 1 ms 364 KB Output is correct
10 Correct 1 ms 364 KB Output is correct
11 Correct 1 ms 364 KB Output is correct
12 Correct 1 ms 364 KB Output is correct
13 Correct 1 ms 364 KB Output is correct
14 Correct 1 ms 364 KB Output is correct
15 Correct 1 ms 364 KB Output is correct
16 Correct 1 ms 364 KB Output is correct
17 Correct 1 ms 364 KB Output is correct
18 Correct 1 ms 364 KB Output is correct
19 Correct 1 ms 364 KB Output is correct
20 Correct 1 ms 384 KB Output is correct
21 Correct 1 ms 384 KB Output is correct
22 Correct 1 ms 364 KB Output is correct
23 Correct 1 ms 364 KB Output is correct
24 Correct 1 ms 364 KB Output is correct
25 Correct 1 ms 364 KB Output is correct
26 Correct 1 ms 364 KB Output is correct
27 Correct 1 ms 364 KB Output is correct
28 Correct 2 ms 492 KB Output is correct
29 Correct 1 ms 364 KB Output is correct
30 Correct 1 ms 384 KB Output is correct
31 Correct 1 ms 364 KB Output is correct
32 Correct 1 ms 364 KB Output is correct
33 Correct 2 ms 492 KB Output is correct
34 Correct 2 ms 492 KB Output is correct
35 Correct 2 ms 492 KB Output is correct
36 Correct 2 ms 384 KB Output is correct
37 Correct 1 ms 364 KB Output is correct
38 Correct 13 ms 1516 KB Output is correct
39 Correct 3 ms 492 KB Output is correct
40 Correct 3 ms 492 KB Output is correct
41 Correct 4 ms 748 KB Output is correct
42 Correct 3 ms 620 KB Output is correct
43 Correct 7 ms 1004 KB Output is correct
44 Correct 13 ms 1516 KB Output is correct
45 Correct 15 ms 1664 KB Output is correct
46 Correct 12 ms 1388 KB Output is correct
47 Correct 5 ms 748 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 640 KB Output is correct
2 Correct 10 ms 1132 KB Output is correct
3 Correct 10 ms 1132 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 3 ms 620 KB Output is correct
6 Correct 10 ms 1132 KB Output is correct
7 Correct 9 ms 1004 KB Output is correct
8 Correct 1 ms 364 KB Output is correct
9 Correct 3 ms 620 KB Output is correct
10 Correct 8 ms 1004 KB Output is correct
11 Correct 10 ms 1132 KB Output is correct
12 Correct 11 ms 1132 KB Output is correct
13 Correct 8 ms 876 KB Output is correct
14 Correct 1 ms 492 KB Output is correct
15 Correct 3 ms 620 KB Output is correct
16 Correct 9 ms 1024 KB Output is correct
17 Correct 10 ms 1132 KB Output is correct
18 Correct 10 ms 1132 KB Output is correct
19 Correct 8 ms 876 KB Output is correct
20 Correct 1 ms 364 KB Output is correct
21 Correct 0 ms 364 KB Output is correct
22 Correct 1 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 0 ms 364 KB Output is correct
3 Correct 3 ms 620 KB Output is correct
4 Correct 5 ms 876 KB Output is correct
5 Correct 6 ms 876 KB Output is correct
6 Correct 5 ms 748 KB Output is correct
7 Correct 2 ms 492 KB Output is correct
8 Correct 5 ms 748 KB Output is correct
9 Correct 10 ms 1132 KB Output is correct
10 Correct 11 ms 1260 KB Output is correct
11 Correct 9 ms 1004 KB Output is correct
12 Correct 4 ms 620 KB Output is correct
13 Correct 3 ms 620 KB Output is correct
14 Correct 9 ms 1004 KB Output is correct
15 Correct 9 ms 1004 KB Output is correct
16 Correct 1 ms 364 KB Output is correct
17 Correct 3 ms 620 KB Output is correct
18 Correct 10 ms 1132 KB Output is correct
19 Correct 1 ms 364 KB Output is correct
20 Correct 12 ms 1512 KB Output is correct
21 Correct 29 ms 3048 KB Output is correct
22 Correct 28 ms 2796 KB Output is correct
23 Correct 10 ms 1132 KB Output is correct
24 Correct 12 ms 1512 KB Output is correct
25 Correct 30 ms 3052 KB Output is correct
26 Correct 10 ms 1132 KB Output is correct
27 Correct 22 ms 2536 KB Output is correct
28 Correct 46 ms 4712 KB Output is correct
29 Correct 54 ms 5352 KB Output is correct
30 Correct 52 ms 4460 KB Output is correct
31 Correct 19 ms 2028 KB Output is correct
32 Correct 1 ms 364 KB Output is correct
33 Correct 1 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 22 ms 2536 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 3 ms 620 KB Output is correct
4 Correct 5 ms 748 KB Output is correct
5 Correct 3 ms 620 KB Output is correct
6 Correct 3 ms 620 KB Output is correct
7 Correct 12 ms 1512 KB Output is correct
8 Correct 12 ms 1512 KB Output is correct
9 Correct 22 ms 2536 KB Output is correct
10 Correct 0 ms 364 KB Output is correct
11 Correct 1 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 364 KB Output is correct
2 Correct 0 ms 364 KB Output is correct
3 Correct 1 ms 384 KB Output is correct
4 Correct 1 ms 236 KB Output is correct
5 Correct 0 ms 364 KB Output is correct
6 Correct 1 ms 256 KB Output is correct
7 Correct 1 ms 384 KB Output is correct
8 Correct 1 ms 364 KB Output is correct
9 Correct 1 ms 364 KB Output is correct
10 Correct 1 ms 364 KB Output is correct
11 Correct 1 ms 364 KB Output is correct
12 Correct 1 ms 364 KB Output is correct
13 Correct 1 ms 364 KB Output is correct
14 Correct 1 ms 364 KB Output is correct
15 Correct 1 ms 364 KB Output is correct
16 Correct 1 ms 364 KB Output is correct
17 Correct 1 ms 364 KB Output is correct
18 Correct 1 ms 364 KB Output is correct
19 Correct 1 ms 364 KB Output is correct
20 Correct 1 ms 384 KB Output is correct
21 Correct 1 ms 384 KB Output is correct
22 Correct 1 ms 364 KB Output is correct
23 Correct 1 ms 364 KB Output is correct
24 Correct 1 ms 364 KB Output is correct
25 Correct 1 ms 364 KB Output is correct
26 Correct 1 ms 364 KB Output is correct
27 Correct 1 ms 364 KB Output is correct
28 Correct 2 ms 492 KB Output is correct
29 Correct 1 ms 364 KB Output is correct
30 Correct 1 ms 384 KB Output is correct
31 Correct 1 ms 364 KB Output is correct
32 Correct 1 ms 364 KB Output is correct
33 Correct 2 ms 492 KB Output is correct
34 Correct 2 ms 492 KB Output is correct
35 Correct 2 ms 492 KB Output is correct
36 Correct 2 ms 384 KB Output is correct
37 Correct 1 ms 364 KB Output is correct
38 Correct 13 ms 1516 KB Output is correct
39 Correct 3 ms 492 KB Output is correct
40 Correct 3 ms 492 KB Output is correct
41 Correct 4 ms 748 KB Output is correct
42 Correct 3 ms 620 KB Output is correct
43 Correct 7 ms 1004 KB Output is correct
44 Correct 13 ms 1516 KB Output is correct
45 Correct 15 ms 1664 KB Output is correct
46 Correct 12 ms 1388 KB Output is correct
47 Correct 5 ms 748 KB Output is correct
48 Correct 3 ms 640 KB Output is correct
49 Correct 10 ms 1132 KB Output is correct
50 Correct 10 ms 1132 KB Output is correct
51 Correct 1 ms 364 KB Output is correct
52 Correct 3 ms 620 KB Output is correct
53 Correct 10 ms 1132 KB Output is correct
54 Correct 9 ms 1004 KB Output is correct
55 Correct 1 ms 364 KB Output is correct
56 Correct 3 ms 620 KB Output is correct
57 Correct 8 ms 1004 KB Output is correct
58 Correct 10 ms 1132 KB Output is correct
59 Correct 11 ms 1132 KB Output is correct
60 Correct 8 ms 876 KB Output is correct
61 Correct 1 ms 492 KB Output is correct
62 Correct 3 ms 620 KB Output is correct
63 Correct 9 ms 1024 KB Output is correct
64 Correct 10 ms 1132 KB Output is correct
65 Correct 10 ms 1132 KB Output is correct
66 Correct 8 ms 876 KB Output is correct
67 Correct 1 ms 364 KB Output is correct
68 Correct 0 ms 364 KB Output is correct
69 Correct 1 ms 364 KB Output is correct
70 Correct 1 ms 364 KB Output is correct
71 Correct 0 ms 364 KB Output is correct
72 Correct 3 ms 620 KB Output is correct
73 Correct 5 ms 876 KB Output is correct
74 Correct 6 ms 876 KB Output is correct
75 Correct 5 ms 748 KB Output is correct
76 Correct 2 ms 492 KB Output is correct
77 Correct 5 ms 748 KB Output is correct
78 Correct 10 ms 1132 KB Output is correct
79 Correct 11 ms 1260 KB Output is correct
80 Correct 9 ms 1004 KB Output is correct
81 Correct 4 ms 620 KB Output is correct
82 Correct 3 ms 620 KB Output is correct
83 Correct 9 ms 1004 KB Output is correct
84 Correct 9 ms 1004 KB Output is correct
85 Correct 1 ms 364 KB Output is correct
86 Correct 3 ms 620 KB Output is correct
87 Correct 10 ms 1132 KB Output is correct
88 Correct 1 ms 364 KB Output is correct
89 Correct 12 ms 1512 KB Output is correct
90 Correct 29 ms 3048 KB Output is correct
91 Correct 28 ms 2796 KB Output is correct
92 Correct 10 ms 1132 KB Output is correct
93 Correct 12 ms 1512 KB Output is correct
94 Correct 30 ms 3052 KB Output is correct
95 Correct 10 ms 1132 KB Output is correct
96 Correct 22 ms 2536 KB Output is correct
97 Correct 46 ms 4712 KB Output is correct
98 Correct 54 ms 5352 KB Output is correct
99 Correct 52 ms 4460 KB Output is correct
100 Correct 19 ms 2028 KB Output is correct
101 Correct 1 ms 364 KB Output is correct
102 Correct 1 ms 364 KB Output is correct
103 Correct 22 ms 2536 KB Output is correct
104 Correct 1 ms 364 KB Output is correct
105 Correct 3 ms 620 KB Output is correct
106 Correct 5 ms 748 KB Output is correct
107 Correct 3 ms 620 KB Output is correct
108 Correct 3 ms 620 KB Output is correct
109 Correct 12 ms 1512 KB Output is correct
110 Correct 12 ms 1512 KB Output is correct
111 Correct 22 ms 2536 KB Output is correct
112 Correct 0 ms 364 KB Output is correct
113 Correct 1 ms 364 KB Output is correct
114 Correct 47 ms 4676 KB Output is correct
115 Correct 1 ms 364 KB Output is correct
116 Correct 3 ms 620 KB Output is correct
117 Correct 21 ms 2156 KB Output is correct
118 Correct 23 ms 2408 KB Output is correct
119 Correct 54 ms 5352 KB Output is correct
120 Correct 54 ms 5352 KB Output is correct
121 Correct 54 ms 5352 KB Output is correct
122 Correct 54 ms 5372 KB Output is correct
123 Correct 22 ms 2536 KB Output is correct
124 Correct 49 ms 4712 KB Output is correct
125 Correct 54 ms 5352 KB Output is correct
126 Correct 56 ms 5352 KB Output is correct
127 Correct 50 ms 4460 KB Output is correct
128 Correct 19 ms 2028 KB Output is correct