art.cpp:4:1: error: 'vector' does not name a type
4 | vector<int> graph[4042];
| ^~~~~~
art.cpp: In function 'void solve(int)':
art.cpp:7:5: error: 'vector' was not declared in this scope
7 | vector<int> posOfVal(n, -1);
| ^~~~~~
art.cpp:7:5: note: suggested alternatives:
In file included from /usr/include/c++/10/vector:67,
from art.h:1,
from art.cpp:1:
/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 art.h:1,
from art.cpp:1:
/usr/include/c++/10/vector:86:13: note: 'std::pmr::vector'
86 | using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
| ^~~~~~
art.cpp:7:12: error: expected primary-expression before 'int'
7 | vector<int> posOfVal(n, -1);
| ^~~
art.cpp:10:16: error: expected primary-expression before 'int'
10 | vector<int> ls {};
| ^~~
art.cpp:11:9: error: 'ls' was not declared in this scope
11 | ls.push_back(i);
| ^~
art.cpp:28:9: error: 'posOfVal' was not declared in this scope
28 | posOfVal[i] = -(curInv - oldInv - (n - 1)) / 2;
| ^~~~~~~~
art.cpp:31:12: error: expected primary-expression before 'int'
31 | vector<int> ls (n, -1);
| ^~~
art.cpp:33:9: error: 'ls' was not declared in this scope
33 | ls[posOfVal[i]] = i;
| ^~
art.cpp:33:12: error: 'posOfVal' was not declared in this scope
33 | ls[posOfVal[i]] = i;
| ^~~~~~~~
art.cpp:34:12: error: 'ls' was not declared in this scope
34 | answer(ls);
| ^~
interface.cpp: In function 'int publish(std::vector<int>)':
interface.cpp:20:17: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
20 | if(v.size() != N) {
| ~~~~~~~~~^~~~
interface.cpp: In function 'void answer(std::vector<int>)':
interface.cpp:36:17: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
36 | if(v.size() != N) {
| ~~~~~~~~~^~~~