foo.cc: In function 'int main()':
foo.cc:16:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(q.size()>=g)
~~~~~~~~^~~
foo.cc:21:9: error: invalid use of member function 'std::priority_queue<_Tp, _Sequence, _Compare>::const_reference std::priority_queue<_Tp, _Sequence, _Compare>::top() const [with _Tp = int; _Sequence = std::vector<int>; _Compare = std::greater<int>; std::priority_queue<_Tp, _Sequence, _Compare>::const_reference = const int&]' (did you forget the '()' ?)
t+=q.top;
~~^~~
foo.cc:21:9: error: in evaluation of 'operator+=(int, <unresolved overloaded function type>)'
t+=q.top;
^~~
foo.cc:22:6: error: invalid use of non-static member function 'void std::priority_queue<_Tp, _Sequence, _Compare>::pop() [with _Tp = int; _Sequence = std::vector<int>; _Compare = std::greater<int>]'
q.pop;
~~^~~
In file included from /usr/include/c++/7/queue:64:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:86,
from foo.cc:1:
/usr/include/c++/7/bits/stl_queue.h:630:7: note: declared here
pop()
^~~
foo.cc:10:6: warning: unused variable 'a' [-Wunused-variable]
int a[g+5];
^
自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。