Problem penguingathering
User Khai
Submission Time 2024-07-12 15:23:42
Score 0
Max Time N/A
Max Memory N/A

Compile Error

penguingathering.cpp: In function ‘int main()’:
penguingathering.cpp:8:23: error: ‘n’ was not declared in this scope
8 | for (int x = 0; x < n ; x++){
| ^
penguingathering.cpp:9:22: error: ‘arr’ was not declared in this scope
9 | cc += (long long)(arr[x] - loc) * (arr[x]-loc);
| ^~~
penguingathering.cpp:11:3: error: ‘bestAns’ was not declared in this scope; did you mean ‘setns’?
11 | bestAns = min(bestAns, cc);
| ^~~~~~~
| setns