Anna.cpp: In function 'void Anna(int, long long int, int, int*)':
Anna.cpp:6:5: error: 'vector' was not declared in this scope
vector<int> ans(N,-1);
^~~~~~
Anna.cpp:6:5: note: suggested alternative:
In file included from /usr/include/c++/7/vector:64:0,
from Anna.cpp:2:
/usr/include/c++/7/bits/stl_vector.h:216:11: note: 'std::vector'
class vector : protected _Vector_base<_Tp, _Alloc>
^~~~~~
Anna.cpp:6:12: error: expected primary-expression before 'int'
vector<int> ans(N,-1);
^~~
Anna.cpp:8:9: error: 'ans' was not declared in this scope
ans[P[i]] = 0;
^~~
Anna.cpp:11:13: error: 'ans' was not declared in this scope
if (ans[i] == 0 || ans[i+1] == 0) {
^~~
Anna.cpp:35:15: error: 'ans' was not declared in this scope
Set(i,ans[i]);
^~~