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

Compile Error

eelimination.cpp:12:15: error: digit separator outside digit sequence
12 | for (int i=n-1'i>=0;i--){
| ^~~
eelimination.cpp: In function ‘int main()’:
eelimination.cpp:12:25: error: expected ‘;’ before ‘)’ token
12 | for (int i=n-1'i>=0;i--){
| ^
| ;
eelimination.cpp:13:9: error: no match for ‘operator!’ (operand type is ‘std::stack<int>’)
13 | while(!stk is empty() and heights[stk.top()]<height[i]{
| ^~~~
eelimination.cpp:13:9: note: candidate: ‘operator!(bool)’ <built-in>
eelimination.cpp:13:9: note: no known conversion for argument 1 from ‘std::stack<int>’ to ‘bool’
eelimination.cpp:13:13: error: expected ‘)’ before ‘is’
13 | while(!stk is empty() and heights[stk.top()]<height[i]{
| ~ ^~~
| )
eelimination.cpp:13:14: error: ‘is’ was not declared in this scope