messy.cpp: In function 'std::vector<int> restore_permutation(int, int, int)':
messy.cpp:6:5: error: 'vector' was not declared in this scope; did you mean 'std::vector'?
6 | vector<int> vs(n,0);
| ^~~~~~
| 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 messy.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>
| ^~~~~~
messy.cpp:6:12: error: expected primary-expression before 'int'
6 | vector<int> vs(n,0);
| ^~~
messy.cpp:7:5: error: 'string' was not declared in this scope; did you mean 'std::string'?
7 | string c;
| ^~~~~~
| std::string
In file included from /usr/include/c++/10/iosfwd:39,
from /usr/include/c++/10/ios:38,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from messy.cpp:1:
/usr/include/c++/10/bits/stringfwd.h:79:33: note: 'std::string' declared here
79 | typedef basic_string<char> string;
| ^~~~~~
messy.cpp:9:9: error: 'c' was not declared in this scope
9 | c+='0';
| ^
messy.cpp:11:11: error: expected ';' before 'result'
11 | string result=c;
| ^~~~~~~
| ;
messy.cpp:13:9: error: 'c' was not declared in this scope
13 | c[i]='1';
| ^
messy.cpp:21:19: error: expected ';' before 'h'
21 | string h=result;
| ^~
| ;
messy.cpp:22:16: error: 'h' was not declared in this scope
22 | if(h[j]=='1'){
| ^
messy.cpp:25:13: error: 'h' was not declared in this scope
25 | h[j]='1';
| ^
messy.cpp:27:17: error: 'result' was not declared in this scope
27 | result[i]='1';
| ^~~~~~
messy.cpp:28:17: error: 'vs' was not declared in this scope
28 | vs[i]=j;
| ^~
messy.cpp:32:12: error: 'vs' was not declared in this scope
32 | return vs;
| ^~