art.cpp: In function 'void solve(int)':
art.cpp:4:5: error: 'vector' was not declared in this scope
4 | vector<int> a;
| ^~~~~~
art.cpp:4:5: 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 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 /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 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:4:12: error: expected primary-expression before 'int'
4 | vector<int> a;
| ^~~
art.cpp:6:9: error: 'a' was not declared in this scope
6 | a.push_back(i);
| ^
art.cpp:8:20: error: 'a' was not declared in this scope
8 | int ls=publish(a);
| ^
art.cpp:9:12: error: expected primary-expression before 'int'
9 | vector<int> ans(n);
| ^~~
art.cpp:14:9: error: 'reverse' was not declared in this scope; did you mean 'std::reverse'?
14 | reverse(a.begin() , a.end());
| ^~~~~~~
| std::reverse
In file included from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from art.cpp:1:
/usr/include/c++/10/pstl/glue_algorithm_defs.h:249:1: note: 'std::reverse' declared here
249 | reverse(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last);
| ^~~~~~~
art.cpp:20:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
20 | ans[p]=i;
| ^~~
| abs
art.cpp:22:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
22 | ans.push_back(a[1]);
| ^~~
| abs
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) {
| ~~~~~~~~~^~~~