encoder.cpp:1:1: error: 'vector' does not name a type
1 | vector<int> get_set(int x) {
| ^~~~~~
encoder.cpp: In function 'int encoder(int, int, int)':
encoder.cpp:18:2: error: 'vector' was not declared in this scope
18 | vector<int> X = get_set(x), Y = get_set(y);
| ^~~~~~
encoder.cpp:18:9: error: expected primary-expression before 'int'
18 | vector<int> X = get_set(x), Y = get_set(y);
| ^~~
encoder.cpp:19:9: error: expected primary-expression before 'bool'
19 | vector<bool> mark(12, false);
| ^~~~
encoder.cpp:20:17: error: 'Y' was not declared in this scope
20 | for (auto it : Y) mark[it] = true;
| ^
encoder.cpp:20:20: error: 'mark' was not declared in this scope
20 | for (auto it : Y) mark[it] = true;
| ^~~~
encoder.cpp:21:17: error: 'X' was not declared in this scope
21 | for (auto it : X) if (!mark[it]) return it + 1;
| ^
encoder.cpp:21:25: error: 'mark' was not declared in this scope
21 | for (auto it : X) if (!mark[it]) return it + 1;
| ^~~~
encoder.cpp:22:2: error: 'assert' was not declared in this scope
22 | assert(false); return -1;
| ^~~~~~
encoder.cpp:1:1: note: 'assert' is defined in header '<cassert>'; did you forget to '#include <cassert>'?
+++ |+#include <cassert>
1 | vector<int> get_set(int x) {
decoder.cpp:1:1: error: 'vector' does not name a type
1 | vector<int> get_set(int x) {
| ^~~~~~
decoder.cpp: In function 'int decode(int, int, int)':
decoder.cpp:18:2: error: 'vector' was not declared in this scope
18 | vector<int> Q = get_set(q); --h;
| ^~~~~~
decoder.cpp:18:9: error: expected primary-expression before 'int'
18 | vector<int> Q = get_set(q); --h;
| ^~~
decoder.cpp:19:17: error: 'Q' was not declared in this scope
19 | for (auto it : Q) if (it == h) return 1;
| ^