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

Compile Error

frogs.cpp: In function ‘int main()’:
frogs.cpp:23:87: error: type/value mismatch at argument 3 in template parameter list for ‘template<class _Tp, class _Sequence, class _Compare> class std::priority_queue’
23 | priority_queue<pair<long long , long long>,vector<pair<long long, long long>>,compare> pq;
| ^
frogs.cpp:23:87: note: expected a type, got ‘compare’
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){
|