/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:10:40: error: no type named 'value_type' in 'struct std::greater<int>'
   10 |         priority_queue<int, greater<int>> p;
      |                                        ^~
/in/foo.cc:10:40: error: template argument 3 is invalid
/in/foo.cc:15:19: error: request for member 'push' in 'p', which is of non-class type 'int'
   15 |                 p.push(a);
      |                   ^~~~
/in/foo.cc:18:18: error: request for member 'size' in 'p', which is of non-class type 'int'
   18 |         while (p.size()>1)
      |                  ^~~~
/in/foo.cc:20:27: error: request for member 'top' in 'p', which is of non-class type 'int'
   20 |                 int a = p.top();
      |                           ^~~
/in/foo.cc:21:19: error: request for member 'pop' in 'p', which is of non-class type 'int'
   21 |                 p.pop();
      |                   ^~~
/in/foo.cc:22:27: error: request for member 'top' in 'p', which is of non-class type 'int'
   22 |                 int b = p.top();
      |                           ^~~
/in/foo.cc:23:19: error: request for member 'pop' in 'p', which is of non-class type 'int'
   23 |                 p.pop();
      |                   ^~~
/in/foo.cc:26:19: error: request for member 'push' in 'p', which is of non-class type 'int'
   26 |                 p.push(c);
      |                   ^~~~

信息

递交者
类型
递交
题目
P1097 合并果子
语言
C++
递交时间
2026-06-02 23:41:41
评测时间
2026-06-02 23:41:41
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes