Problem minstack
User Shadow1
Submission Time 2024-05-01 19:43:10
Score 0
Max Time N/A
Max Memory N/A

Compile Error

minstack.cpp:38:12: error: redefinition of ‘std::stack<int> st’
38 | stack<int> st, minstack;
| ^~
minstack.cpp:8:12: note: ‘std::stack<int> st’ previously declared here
8 | stack<int> st, minstack;
| ^~
minstack.cpp:38:16: error: redefinition of ‘std::stack<int> minstack’
38 | stack<int> st, minstack;
| ^~~~~~~~
minstack.cpp:8:16: note: ‘std::stack<int> minstack’ previously declared here
8 | stack<int> st, minstack;
| ^~~~~~~~
minstack.cpp:39:5: error: redefinition of ‘int ptr’
39 | int ptr = 0;
| ^~~
minstack.cpp:9:5: note: ‘int ptr’ previously defined here
9 | int ptr = 0;
| ^~~
minstack.cpp:41:6: error: redefinition of ‘void push(int)’
41 | void push(int X) {
| ^~~~
minstack.cpp:11:6: note: ‘void push(int)’ previously defined here
11 | vo