Problem sort
User IyasM
Submission Time 2025-12-26 22:26:14
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sort.cpp: In function ‘int32_t main()’:
sort.cpp:8:36: error: no type named ‘value_type’ in ‘struct std::greater<long long int>’
8 | priority_queue<int, greater<int>> pq;
| ^~
sort.cpp:8:36: error: template argument 3 is invalid
sort.cpp:11:12: error: request for member ‘push’ in ‘pq’, which is of non-class type ‘int’
11 | pq.push(x);
| ^~~~
sort.cpp:13:16: error: request for member ‘empty’ in ‘pq’, which is of non-class type ‘int’
13 | while (!pq.empty()){
| ^~~~~
sort.cpp:14:20: error: request for member ‘top’ in ‘pq’, which is of non-class type ‘int’
14 | cout << pq.top() << " ";
| ^~~
sort.cpp:15:12: error: request for member ‘pop’ in ‘pq’, which is of non-class type ‘int’
15 | pq.pop();
| ^~~