/in/foo.cc:9:25: error: 'vector' was not declared in this scope
std::priority_queue<int,vector<int>,greater<int> > q;
^~~~~~
/in/foo.cc:9:25: note: suggested alternative:
In file included from /usr/include/c++/6/vector:64:0,
from /usr/include/c++/6/queue:61,
from /in/foo.cc:6:
/usr/include/c++/6/bits/stl_vector.h:214:11: note: 'std::vector'
class vector : protected _Vector_base<_Tp, _Alloc>
^~~~~~
/in/foo.cc:9:35: error: template argument 2 is invalid
std::priority_queue<int,vector<int>,greater<int> > q;
^
/in/foo.cc:9:35: error: template argument 3 is invalid
/in/foo.cc:9:36: error: expected unqualified-id before ',' token
std::priority_queue<int,vector<int>,greater<int> > q;
^
/in/foo.cc:9:44: error: expected initializer before '<' token
std::priority_queue<int,vector<int>,greater<int> > q;
^
/in/foo.cc: In function 'int main()':
/in/foo.cc:15:36: error: 'q' was not declared in this scope
for(int i=0;i<n;i++){cin>>b[i];q.push(b[i]);}
^
/in/foo.cc:16:11: error: 'q' was not declared in this scope
while(q.size()>2)
^