Problem frogs
User Henries
Submission Time 2024-10-10 12:47:39
Score 0
Max Time N/A
Max Memory N/A

Compile Error

frogs.cpp: In function ‘int main()’:
frogs.cpp:23:52: error: type/value mismatch at argument 2 in template parameter list for ‘template<class _Tp, class _Sequence, class _Compare> class std::priority_queue’
23 | priority_queue<pair<long long , long long>,compare> pq;
| ^
frogs.cpp:23:52: note: expected a type, got ‘compare’
frogs.cpp:23:52: error: template argument 3 is invalid
frogs.cpp:25:6: error: request for member ‘push’ in ‘pq’, which is of non-class type ‘int’
25 | pq.push(make_pair(n/jumps[i],i+1));
| ^~~~
frogs.cpp:27:25: error: request for member ‘top’ in ‘pq’, which is of non-class type ‘int’
27 | long long current = pq.top().first;
| ^~~
frogs.cpp:30:10: error: request for member ‘top’ in ‘pq’, which is of non-class type ‘int’
30 | if (pq.top().first == current){
| ^~~
frogs.cpp:31