/ MYOJ /

记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:13:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  while(q.size()>=g)
        ~~~~~~~~^~~
foo.cc:18: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:18:9: error:   in evaluation of 'operator+=(int, <unresolved overloaded function type>)'
    t+=q.top;
         ^~~
foo.cc:19: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)进行评测。

信息

递交者
类型
递交
题目
P1030 [b6e0OJ]合并石子
语言
C++
递交时间
2021-04-07 21:37:20
评测时间
2021-04-07 21:37:20
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes