fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. std::priority_queue<task> read_tasks(int n){
  5. std::priority_queue<task> tasks(task, std::vector<task>, compare);
  6. task t;
  7. for(int i = 0; i < n; i++){
  8. t.id = i + 1;
  9. std::cin >> t.time;
  10. std::cin >> t.priority;
  11. tasks.push(t);
  12. }
  13. return tasks;
  14. }
  15.  
  16. int main() {
  17. // your code goes here
  18. return 0;
  19. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:4:6: error: 'priority_queue' in namespace 'std' does not name a template type
 std::priority_queue<task> read_tasks(int n){
      ^
stdout
Standard output is empty