Problem lvm
User bachnguyen123
Submission Time 2026-06-23 15:18:56
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lvm.cpp: In function ‘int main()’:
lvm.cpp:24:2: error: ‘stack’ was not declared in this scope
24 | stack<int> s;
| ^~~~~
lvm.cpp:6:1: note: ‘std::stack’ is defined in header ‘<stack>’; did you forget to ‘#include <stack>’?
5 | #include <algorithm>
+++ |+#include <stack>
6 | using namespace std;
lvm.cpp:7:13: error: expected primary-expression before ‘long’
7 | #define int long long
| ^~~~
lvm.cpp:24:8: note: in expansion of macro ‘int’
24 | stack<int> s;
| ^~~
lvm.cpp:31:4: error: ‘s’ was not declared in this scope; did you mean ‘ss’?
31 | s.push(ins[i].second);
| ^
| ss
lvm.cpp:34:14: error: ‘s’ was not declared in this scope; did you mean ‘ss’?
34 | storage = s.top();
| ^
| ss
lvm.cpp:38:4: error: ‘s’ was not declared in this scope; did you mean ‘ss’?