speedrun.cpp:8:1: error: 'vector' does not name a type
8 | vector<int> adj[1007];
| ^~~~~~
speedrun.cpp:9:1: error: 'vector' does not name a type
9 | vector<int> dorder[1007];
| ^~~~~~
speedrun.cpp: In function 'void dfs(int, int, int)':
speedrun.cpp:14:2: error: 'dorder' was not declared in this scope
14 | dorder[d].push_back(x);
| ^~~~~~
speedrun.cpp:15:16: error: 'adj' was not declared in this scope
15 | for (auto y : adj[x]){
| ^~~
speedrun.cpp: In function 'void assignHints(int, int, int*, int*)':
speedrun.cpp:27:3: error: 'adj' was not declared in this scope
27 | adj[A[x]].push_back(B[x]);
| ^~~
speedrun.cpp:34:2: error: 'vector' was not declared in this scope
34 | vector<int> inorder;
| ^~~~~~
speedrun.cpp:34:2: note: suggested alternatives:
In file included from /usr/include/c++/10/vector:67,
from /usr/include/c++/10/functional:62,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from speedrun.cpp:3:
/usr/include/c++/10/bits/stl_vector.h:389:11: note: 'std::vector'
389 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
In file included from /usr/include/c++/10/functional:62,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from speedrun.cpp:3:
/usr/include/c++/10/vector:86:13: note: 'std::pmr::vector'
86 | using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
| ^~~~~~
speedrun.cpp:34:9: error: expected primary-expression before 'int'
34 | vector<int> inorder;
| ^~~
speedrun.cpp:36:17: error: 'dorder' was not declared in this scope
36 | for (auto y : dorder[x]){
| ^~~~~~
speedrun.cpp:37:4: error: 'inorder' was not declared in this scope; did you mean 'index'?
37 | inorder.push_back(y);
| ^~~~~~~
| index
speedrun.cpp:46:9: error: 'inorder' was not declared in this scope; did you mean 'index'?
46 | next[ inorder[x] ] = inorder[x+1];
| ^~~~~~~
| index
speedrun.cpp:48:7: error: 'inorder' was not declared in this scope; did you mean 'index'?
48 | next[inorder[N-1]] = inorder[0];
| ^~~~~~~
| index
speedrun.cpp: At global scope:
speedrun.cpp:102:1: error: 'vector' does not name a type
102 | vector<int> moves[1007];
| ^~~~~~
speedrun.cpp: In function 'void trace(int)':
speedrun.cpp:106:16: error: 'moves' was not declared in this scope
106 | for (auto z : moves[x]){
| ^~~~~
speedrun.cpp: In function 'void speedrun(int, int, int)':
speedrun.cpp:117:2: error: 'vector' was not declared in this scope
117 | vector<int> inorder;
| ^~~~~~
speedrun.cpp:117:2: note: suggested alternatives:
In file included from /usr/include/c++/10/vector:67,
from /usr/include/c++/10/functional:62,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from speedrun.cpp:3:
/usr/include/c++/10/bits/stl_vector.h:389:11: note: 'std::vector'
389 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
In file included from /usr/include/c++/10/functional:62,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from speedrun.cpp:3:
/usr/include/c++/10/vector:86:13: note: 'std::pmr::vector'
86 | using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
| ^~~~~~
speedrun.cpp:117:9: error: expected primary-expression before 'int'
117 | vector<int> inorder;
| ^~~
speedrun.cpp:118:2: error: 'inorder' was not declared in this scope; did you mean 'index'?
118 | inorder.push_back(1);
| ^~~~~~~
| index
speedrun.cpp:125:3: error: 'cerr' was not declared in this scope; did you mean 'std::cerr'?
125 | cerr << nextnode << ' ' << ptr << ' ' << inorder[ptr] << '\n';
| ^~~~
| std::cerr
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:75,
from speedrun.cpp:3:
/usr/include/c++/10/iostream:62:18: note: 'std::cerr' declared here
62 | extern ostream cerr; /// Linked to standard error (unbuffered)
| ^~~~
speedrun.cpp:134:4: error: 'moves' was not declared in this scope
134 | moves[cur] = moves[inorder[ptr]];
| ^~~~~