Problem sandd
User chickengoat
Submission Time 2026-07-18 09:22:55
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sandd.cpp: In function ‘int getPrice(int)’:
sandd.cpp:6:2: error: ‘lo’ was not declared in this scope; did you mean ‘ll’?
6 | lo=0;
| ^~
| ll
sandd.cpp:7:2: error: ‘hi’ was not declared in this scope
7 | hi=p;
| ^~
sandd.cpp:9:3: error: ‘mid’ was not declared in this scope
9 | mid=(hi+lo)/2;
| ^~~
sandd.cpp:10:3: error: ‘as’ was not declared in this scope; did you mean ‘abs’?
10 | as=supply(lo);
| ^~
| abs
sandd.cpp:11:3: error: ‘ad’ was not declared in this scope
11 | ad=demand(lo);
| ^~
sandd.cpp:12:3: error: ‘bs’ was not declared in this scope; did you mean ‘abs’?
12 | bs=supply(mid);
| ^~
| abs
sandd.cpp:13:3: error: ‘bd’ was not declared in this scope
13 | bd=demand(mid);
| ^~
sandd.cpp: At global scope:
sandd.cpp:32:1: error: expected declaration before ‘}’ token
32 | }
| ^