art.cpp:6:9: error: 'vector' does not name a type
6 | typedef vector<int> vi;
| ^~~~~~
art.cpp: In function 'void solve(int)':
art.cpp:27:5: error: 'vector' was not declared in this scope
27 | vector<int> ans(N);
| ^~~~~~
art.cpp:27:5: note: suggested alternatives:
In file included from /usr/include/c++/10/vector:67,
from art.cpp:2:
/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.cpp:2:
/usr/include/c++/10/vector:86:13: note: 'std::pmr::vector'
86 | using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
| ^~~~~~
art.cpp:27:12: error: expected primary-expression before 'int'
27 | vector<int> ans(N);
| ^~~
art.cpp:28:10: error: 'ans' was not declared in this scope; did you mean 'abs'?
28 | iota(ans.begin(), ans.end(), 1ll);
| ^~~
| abs
art.cpp:28:5: error: 'iota' was not declared in this scope; did you mean 'std::iota'?
28 | iota(ans.begin(), ans.end(), 1ll);
| ^~~~
| std::iota
In file included from /usr/include/c++/10/numeric:62,
from art.cpp:4:
/usr/include/c++/10/bits/stl_numeric.h:88:5: note: 'std::iota' declared here
88 | iota(_ForwardIterator __first, _ForwardIterator __last, _Tp __value)
| ^~~~
art.cpp:36:13: error: 'swap' was not declared in this scope
36 | swap(ans[i], ans[j]);
| ^~~~
art.cpp:36:13: note: suggested alternatives:
In file included from /usr/include/c++/10/unordered_map:47,
from /usr/include/c++/10/functional:61,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from art.cpp:3:
/usr/include/c++/10/bits/unordered_map.h:2083:5: note: 'std::swap'
2083 | swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
| ^~~~
In file included from /usr/include/c++/10/exception:147,
from /usr/include/c++/10/ios:39,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from art.cpp:1:
/usr/include/c++/10/bits/exception_ptr.h:169:5: note: 'std::__exception_ptr::swap'
169 | swap(exception_ptr& __lhs, exception_ptr& __rhs)
| ^~~~
In file included from /usr/include/c++/10/bits/nested_exception.h:40,
from /usr/include/c++/10/exception:148,
from /usr/include/c++/10/ios:39,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from art.cpp:1:
/usr/include/c++/10/bits/move.h:189:5: note: 'std::swap'
189 | swap(_Tp& __a, _Tp& __b)
| ^~~~
/usr/include/c++/10/bits/move.h:189:5: note: 'std::swap'
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) {
| ~~~~~~~~~^~~~