vision.cpp:3:1: error: 'vector' does not name a type
3 | vector<int> rdiag[405];
| ^~~~~~
vision.cpp:4:1: error: 'vector' does not name a type
4 | vector<int> ldiag[405];
| ^~~~~~
vision.cpp: In function 'int test(int)':
vision.cpp:12:5: error: 'vector' was not declared in this scope; did you mean 'std::vector'?
12 | vector<int> retl;
| ^~~~~~
| std::vector
In file included from /usr/include/c++/9/vector:67,
from /usr/include/c++/9/queue:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:86,
from vision.cpp:1:
/usr/include/c++/9/bits/stl_vector.h:386:11: note: 'std::vector' declared here
386 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
vision.cpp:12:12: error: expected primary-expression before 'int'
12 | vector<int> retl;
| ^~~
vision.cpp:14:16: error: expected primary-expression before 'int'
14 | vector<int> X;
| ^~~
vision.cpp:15:16: error: expected primary-expression before 'int'
15 | vector<int> O;
| ^~~
vision.cpp:18:13: error: 'X' was not declared in this scope
18 | X.push_back(ldiagxor[i+j]);
| ^
vision.cpp:19:13: error: 'O' was not declared in this scope
19 | O.push_back(ldiagor[i+j]);
| ^
vision.cpp:22:9: error: 'retl' was not declared in this scope
22 | retl.push_back(add_and({add_or(O), add_not(add_xor(X))}));
| ^~~~
vision.cpp:22:40: error: 'O' was not declared in this scope
22 | retl.push_back(add_and({add_or(O), add_not(add_xor(X))}));
| ^
vision.cpp:22:60: error: 'X' was not declared in this scope
22 | retl.push_back(add_and({add_or(O), add_not(add_xor(X))}));
| ^
vision.cpp:22:64: error: could not convert '{<expression error>, <expression error>}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
22 | retl.push_back(add_and({add_or(O), add_not(add_xor(X))}));
| ^
| |
| <brace-enclosed initializer list>
vision.cpp:25:12: error: expected primary-expression before 'int'
25 | vector<int> retr;
| ^~~
vision.cpp:27:16: error: expected primary-expression before 'int'
27 | vector<int> X;
| ^~~
vision.cpp:28:16: error: expected primary-expression before 'int'
28 | vector<int> O;
| ^~~
vision.cpp:31:13: error: 'X' was not declared in this scope
31 | X.push_back(rdiagxor[i+j]);
| ^
vision.cpp:32:13: error: 'O' was not declared in this scope
32 | O.push_back(rdiagor[i+j]);
| ^
vision.cpp:35:9: error: 'retr' was not declared in this scope
35 | retr.push_back(add_and({add_or(O), add_not(add_xor(X))}));
| ^~~~
vision.cpp:35:40: error: 'O' was not declared in this scope
35 | retr.push_back(add_and({add_or(O), add_not(add_xor(X))}));
| ^
vision.cpp:35:60: error: 'X' was not declared in this scope
35 | retr.push_back(add_and({add_or(O), add_not(add_xor(X))}));
| ^
vision.cpp:35:64: error: could not convert '{<expression error>, <expression error>}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
35 | retr.push_back(add_and({add_or(O), add_not(add_xor(X))}));
| ^
| |
| <brace-enclosed initializer list>
vision.cpp:39:28: error: 'retl' was not declared in this scope
39 | return add_and({add_or(retl), add_or(retr)});
| ^~~~
vision.cpp:39:42: error: 'retr' was not declared in this scope
39 | return add_and({add_or(retl), add_or(retr)});
| ^~~~
vision.cpp:39:48: error: could not convert '{<expression error>, <expression error>}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
39 | return add_and({add_or(retl), add_or(retr)});
| ^
| |
| <brace-enclosed initializer list>
vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:45:13: error: 'ldiag' was not declared in this scope; did you mean 'ldiagor'?
45 | ldiag[i+j].push_back(i*W+j);
| ^~~~~
| ldiagor
vision.cpp:46:13: error: 'rdiag' was not declared in this scope; did you mean 'rdiagor'?
46 | rdiag[H-1-i+j].push_back(i*W+j);
| ^~~~~
| rdiagor
vision.cpp:50:13: error: 'ldiag' was not declared in this scope; did you mean 'ldiagor'?
50 | if (ldiag[i].size()) ldiagxor[i] = add_xor(ldiag[i]);
| ^~~~~
| ldiagor
vision.cpp:51:13: error: 'ldiag' was not declared in this scope; did you mean 'ldiagor'?
51 | if (ldiag[i].size()) ldiagor[i] = add_or(ldiag[i]);
| ^~~~~
| ldiagor
vision.cpp:52:13: error: 'rdiag' was not declared in this scope; did you mean 'rdiagor'?
52 | if (rdiag[i].size()) rdiagxor[i] = add_xor(rdiag[i]);
| ^~~~~
| rdiagor
vision.cpp:53:13: error: 'rdiag' was not declared in this scope; did you mean 'rdiagor'?
53 | if (rdiag[i].size()) rdiagor[i] = add_or(rdiag[i]);
| ^~~~~
| rdiagor