gondola.cpp: In function 'int valid(int, int*)':
gondola.cpp:37:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (st.size() != n)return 0;
~~~~~~~~~~^~~~
gondola.cpp: In function 'int countReplacement(int, int*)':
gondola.cpp:101:5: error: 'vector' was not declared in this scope
vector<int> v;
^~~~~~
gondola.cpp:101:5: note: suggested alternative:
In file included from /usr/include/c++/7/vector:64:0,
from /usr/include/c++/7/queue:61,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:86,
from gondola.cpp:2:
/usr/include/c++/7/bits/stl_vector.h:216:11: note: 'std::vector'
class vector : protected _Vector_base<_Tp, _Alloc>
^~~~~~
gondola.cpp:101:12: error: expected primary-expression before 'int'
vector<int> v;
^~~
gondola.cpp:103:22: error: 'v' was not declared in this scope
if(a[i] > n) v.push_back(a[i]);
^
gondola.cpp:104:10: error: 'v' was not declared in this scope
sort(v.begin(), v.end());
^
gondola.cpp:104:5: error: 'sort' was not declared in this scope
sort(v.begin(), v.end());
^~~~
gondola.cpp:104:5: note: suggested alternative:
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from gondola.cpp:2:
/usr/include/c++/7/bits/stl_algo.h:4856:5: note: 'std::sort'
sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
^~~~