Problem ranges
User usernamehere
Submission Time 2025-10-19 11:39:40
Score 0
Max Time N/A
Max Memory N/A

Compile Error

ranges.cpp: In function ‘int main()’:
ranges.cpp:83:13: error: ‘s’ was not declared in this scope
83 | if (s.empty()) continue;
| ^
ranges.cpp:84:24: error: ‘p’ was not declared in this scope
84 | ll range = abs(p.top() - q.top()) + 1;
| ^
ranges.cpp:84:36: error: request for member ‘top’ in ‘q’, which is of non-class type ‘ll’ {aka ‘long long int’}
84 | ll range = abs(p.top() - q.top()) + 1;
| ^~~
ranges.cpp:87:23: error: no matching function for call to ‘std::priority_queue<long long int>::pop(ll&)’
87 | pppp.pop(x);
| ^
In file included from /usr/include/c++/9/queue:64,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:86,
from ranges.cpp:1:
/usr/include/c++/9/bits/stl_queue.h:662:7: note: candidate: ‘void std::priority_queue<_