F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_39699860_21526.cpp: In function 'int main()':
0_0_39699860_21526.cpp:16:8: error: 'priority_queue' was not declared in this scope
   16 |        priority_queue<int, vector<int>, greater<>> ps;
      |        ^~~~~~~~~~~~~~
0_0_39699860_21526.cpp:7:1: note: 'std::priority_queue' is defined in header '<queue>'; did you forget to '#include <queue>'?
    6 | #include <algorithm>
  +++ |+#include <queue>
    7 | 
0_0_39699860_21526.cpp:16:23: error: expected primary-expression before 'int'
   16 |        priority_queue<int, vector<int>, greater<>> ps;
      |                       ^~~
0_0_39699860_21526.cpp:20:12: error: 'ps' was not declared in this scope
   20 |            ps.push(tmp);
      |            ^~
0_0_39699860_21526.cpp:24:16: error: 'ps' was not declared in this scope
   24 |        while (!ps.empty()) {
      |                ^~


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-12-02 03:29:08, Gzip enabled