| Problem | penguingathering |
|---|---|
| User | Matrixworld |
| Submission Time | 2026-06-25 08:57:50 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
penguingathering.cpp: In function ‘int main()’:
penguingathering.cpp:12:14: error: expected ‘;’ before ‘}’ token
12 | cin >> x[i]
| ^
| ;
13 | }
| ~
penguingathering.cpp:16:26: error: expected ‘;’ before ‘p’
16 | for(int p = 1; p <= 1000 p++){
| ^~
| ;
penguingathering.cpp:21:21: error: ‘p’ was not declared in this scope
21 | int dist = x[i] - p;
| ^
penguingathering.cpp:22:3: error: ‘dist’ was not declared in this scope
22 | dist *= dist;
| ^~~~
penguingathering.cpp:23:3: error: ‘sumd’ was not declared in this scope
23 | sumd += dist;
| ^~~~
penguingathering.cpp: At global scope:
penguingathering.cpp:25:14: error: expected unqualified-id before ‘if’
25 | if (sumd < ans) ans = sumd;
|