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

Compile Error

ranges.cpp: In function ‘int main()’:
ranges.cpp:80:13: error: ‘p’ was not declared in this scope
80 | p.push(x);
| ^
ranges.cpp:81:6: error: request for member ‘push’ in ‘q’, which is of non-class type ‘ll’ {aka ‘long long int’}
81 | q.push(x);
| ^~~~
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:88:6: error: request for member ‘pop’ in ‘q’, which is of non-class type ‘ll’ {aka ‘long long int’}
88 | q.pop(x);
| ^~~