Problem medianheap
User jmuzhen
Submission Time 2024-06-29 16:07:11
Score 0
Max Time N/A
Max Memory N/A

Compile Error

medianheap.cpp: In function ‘int main()’:
medianheap.cpp:29:23: error: template argument 3 is invalid
29 | pq<int, vector<int>, greater<int>) right; // smallest first
| ^~~~~~~~~~~~
medianheap.cpp:29:35: error: expected unqualified-id before ‘)’ token
29 | pq<int, vector<int>, greater<int>) right; // smallest first
| ^
medianheap.cpp:35:34: error: request for member ‘top’ in ‘std::right’, which is of non-class type ‘std::ios_base&(std::ios_base&)’
35 | int L = left.top(), R = right.top();
| ^~~
medianheap.cpp:37:15: error: request for member ‘push’ in ‘std::right’, which is of non-class type ‘std::ios_base&(std::ios_base&)’
37 | else right.push(x);
| ^~~~
medianheap.cpp:46:16: error: invalid initialization of reference of type ‘std::priority_queue<int>&’ from expressi