encoder.cpp: In function 'int encode(int, int, int)':
encoder.cpp:23:22: warning: control reaches end of non-void function [-Wreturn-type]
23 | vector<int> v(n+1);
| ^
decoder.cpp: In function 'int decode(int, int, int)':
decoder.cpp:6:5: error: 'vector' was not declared in this scope; did you mean 'std::vector'?
6 | vector<int> v(n+1);
| ^~~~~~
| std::vector
In file included from /usr/include/c++/10/vector:67,
from /usr/include/c++/10/queue:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
from decoder.cpp:1:
/usr/include/c++/10/bits/stl_vector.h:389:11: note: 'std::vector' declared here
389 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
decoder.cpp:6:12: error: expected primary-expression before 'int'
6 | vector<int> v(n+1);
| ^~~
decoder.cpp:10:13: error: 'v' was not declared in this scope
10 | v[id] = i;
| ^