Problem minstack
User polyda
Submission Time 2024-06-23 18:51:25
Score 0
Max Time N/A
Max Memory N/A

Compile Error

minstack.cpp: In function ‘void push(int)’:
minstack.cpp:7:10: error: ‘x’ was not declared in this scope
7 | pq.push(x);
| ^
minstack.cpp: In function ‘void pop()’:
minstack.cpp:16:12: error: ‘class std::queue<int>’ has no member named ‘top’; did you mean ‘pop’?
16 | td.push(q.top());
| ^~~
| pop
minstack.cpp: In function ‘int top()’:
minstack.cpp:25:11: error: ‘class std::queue<int>’ has no member named ‘top’; did you mean ‘pop’?
25 | return q.top();
| ^~~
| pop