Problem minstack
User ashgreninja1006
Submission Time 2025-07-12 19:39:14
Score 0
Max Time N/A
Max Memory N/A

Compile Error

minstack.cpp:1:1: error: ‘stack’ does not name a type
1 | stack<int> s;
| ^~~~~
minstack.cpp:2:1: error: ‘stack’ does not name a type
2 | stack<int> min;
| ^~~~~
minstack.cpp: In function ‘void push(int)’:
minstack.cpp:6:2: error: ‘s’ was not declared in this scope
6 | s.push(X);
| ^
minstack.cpp:8:3: error: ‘min’ was not declared in this scope
8 | min.push(X)
| ^~~
minstack.cpp:11:3: error: ‘min’ was not declared in this scope
11 | min.push(s.top());
| ^~~
minstack.cpp: In function ‘void pop()’:
minstack.cpp:17:2: error: ‘s’ was not declared in this scope
17 | s.pop();
| ^
minstack.cpp:18:2: error: ‘min’ was not declared in this scope
18 | min.pop();
| ^~~
minstack.cpp: In function ‘int top()’:
minstack.cpp:22:2: error: ‘cout’ was not declared in this scope
22 | cout << s.top();
| ^~~~
minstack.cp