Problem brick
User audreycyr010
Submission Time 2024-07-29 14:12:30
Score 0
Max Time N/A
Max Memory N/A

Compile Error

brick.cpp: In function ‘int main()’:
brick.cpp:6:19: error: ‘n’ was not declared in this scope
6 | for (int i = 0;i<n;i++)(
| ^
brick.cpp:7:3: error: expected primary-expression before ‘int’
7 | int brick;cin>>brick;
| ^~~
brick.cpp:6:26: error: expected ‘)’ before ‘int’
6 | for (int i = 0;i<n;i++)(
| ~^
| )
7 | int brick;cin>>brick;
| ~~~
brick.cpp:7:18: error: ‘brick’ was not declared in this scope
7 | int brick;cin>>brick;
| ^~~~~
brick.cpp:9:28: error: expected ‘)’ before ‘;’ token
9 | stackofbricks.pop_back();
| ^
| )
brick.cpp:8:63: note: to match this ‘(’
8 | while(stackofbricks.size()>0 && stackofbricks.back()<=brick)(
|