Problem eelimination
User ayreentazz
Submission Time 2026-04-25 09:45:20
Score 0
Max Time N/A
Max Memory N/A

Compile Error

eelimination.cpp: In function ‘int main()’:
eelimination.cpp:12:24: error: expected ‘;’ before ‘)’ token
12 | for(int i=n-1;i>=0,i--){
| ^
| ;
eelimination.cpp:13:45: error: ‘height’ was not declared in this scope; did you mean ‘heights’?
13 | while(!stk.empty() and heights[stk.top()]<height[i]){
| ^~~~~~
| heights
eelimination.cpp:17:4: error: ‘answer’ was not declared in this scope
17 | answer[i]=0;
| ^~~~~~
eelimination.cpp:18:3: error: expected ‘}’ before ‘else’
18 | else{
| ^~~~
eelimination.cpp:16:18: note: to match this ‘{’
16 | if(stk.empty()){
| ^
eelimination.cpp:19:4: error: ‘answer’ was not declared in this scope
19 | answer[i]=stk.top();
| ^~~~~~
eelimination.cpp:22:22: e