Problem sandd
User ensonchew
Submission Time 2025-06-09 17:20:20
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sandd.cpp: In function ‘long long int getPrice(long long int)’:
sandd.cpp:9:11: error: ‘supply’ was not declared in this scope
9 | int s = supply(a);
| ^~~~~~
sandd.cpp:10:11: error: ‘demand’ was not declared in this scope
10 | int d = demand(a);
| ^~~~~~
sandd.cpp:11:7: error: ‘S’ was not declared in this scope
11 | if (S > d){
| ^
sandd.cpp:3:13: error: expected primary-expression before ‘long’
3 | #define int long long
| ^~~~
sandd.cpp:20:9: note: in expansion of macro ‘int’
20 | return int(a);
| ^~~
sandd.cpp:20:8: error: expected ‘;’ before ‘long’
20 | return int(a);
| ^
| ;
sandd.cpp:20:13: error: conflicting declaration ‘long long int a’
20 | return int(a);
| ^
sandd.cpp:6:8: note: previous declaration as ‘float a’
6 | float a = P/2;
|