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

Compile Error

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