Problem sandd
User lexuantung71
Submission Time 2025-03-22 11:27:53
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sandd.cpp: In function ‘int getPrice(int)’:
sandd.cpp:6:23: error: ‘demand’ was not declared in this scope
6 | long long d = demand(mid);
| ^~~~~~
sandd.cpp:7:23: error: ‘supply’ was not declared in this scope
7 | long long s = supply(mid);
| ^~~~~~
sandd.cpp:20:22: error: ‘demand’ was not declared in this scope
20 | long long dLow = demand(low), sLow = supply(low);
| ^~~~~~
sandd.cpp:23:20: error: ‘sLow’ was not declared in this scope; did you mean ‘dLow’?
23 | if (abs(dLow - sLow) <= abs(dHigh - sHigh)) {
| ^~~~
| dLow
sandd.cpp:23:9: error: ‘abs’ was not declared in this scope
23 | if (abs(dLow - sLow) <= abs(dHigh - sHigh)) {
| ^~~
sandd.cpp:23:41: error: ‘sHigh’ was not declared in this scope; did you mean ‘dHigh’?
23 | if (ab