ricehub.cpp: In function 'int besthub(int, int, int*, long long int)':
ricehub.cpp:7:2: error: 'vector' was not declared in this scope
vector<int>V;
^~~~~~
ricehub.cpp:7:2: 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 ricehub.cpp:2:
/usr/include/c++/7/bits/stl_vector.h:216:11: note: 'std::vector'
class vector : protected _Vector_base<_Tp, _Alloc>
^~~~~~
ricehub.cpp:7:9: error: expected primary-expression before 'int'
vector<int>V;
^~~
ricehub.cpp:15:4: error: 'V' was not declared in this scope
V.push_back(a);
^
ricehub.cpp:17:8: error: 'V' was not declared in this scope
sort(V.begin(), V.end());
^
ricehub.cpp:17:3: error: 'sort' was not declared in this scope
sort(V.begin(), V.end());
^~~~
ricehub.cpp:17:3: 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 ricehub.cpp:2:
/usr/include/c++/7/bits/stl_algo.h:4856:5: note: 'std::sort'
sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
^~~~
ricehub.cpp:20:9: error: 'j' was not declared in this scope
if(V[j]<=cp)
^