Problem catlunch
User benji9736
Submission Time 2025-12-13 16:07:16
Score 0
Max Time N/A
Max Memory N/A

Compile Error

catlunch.cpp: In function ‘int main()’:
catlunch.cpp:7:34: error: no matching function for call to ‘std::priority_queue<int>::priority_queue(int&)’
7 | priority_queue<int> topkfishes(k);
| ^
In file included from /usr/include/c++/9/queue:64,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:86,
from catlunch.cpp:1:
/usr/include/c++/9/bits/stl_queue.h:584:2: note: candidate: ‘template<class _InputIterator> std::priority_queue<_Tp, _Sequence, _Compare>::priority_queue(_InputIterator, _InputIterator, const _Compare&, _Sequence&&)’
584 | priority_queue(_InputIterator __first, _InputIterator __last,
| ^~~~~~~~~~~~~~
/usr/include/c++/9/bits/stl_queue.h:584:2: note: template argument deduction/substitution failed:
catlunch.cpp:7:34: note: candidate expects 4 arguments, 1 provided
7 | priority_queue<int> topkfishes(k);