Problem brick
User CENRUI
Submission Time 2026-11-14 14:42:09
Score 0
Max Time N/A
Max Memory N/A

Compile Error

brick.cpp: In function ‘int main()’:
brick.cpp:23:5: error: ‘stack’ was not declared in this scope
23 | stack<int> s;
| ^~~~~
brick.cpp:13:1: note: ‘std::stack’ is defined in header ‘<stack>’; did you forget to ‘#include <stack>’?
12 | #include <set>
+++ |+#include <stack>
13 | #include <string>
brick.cpp:23:11: error: expected primary-expression before ‘int’
23 | stack<int> s;
| ^~~
brick.cpp:28:17: error: ‘s’ was not declared in this scope
28 | while (!s.empty() && s.top() <= a) {
| ^
brick.cpp:33:9: error: ‘s’ was not declared in this scope
33 | s.push(a);
| ^
brick.cpp:35:13: error: ‘s’ was not declared in this scope
35 | while (!s.empty()) {
| ^