Problem penguingathering
User Rigiddivot251112
Submission Time 2026-06-24 15:02:42
Score 0
Max Time N/A
Max Memory N/A

Compile Error

penguingathering.cpp: In function ‘int main()’:
penguingathering.cpp:22:9: error: ‘annoyance1’ was not declared in this scope
22 | annoyance1 += (k1 - x[i]) * (k1 - x[i]);
| ^~~~~~~~~~
penguingathering.cpp:22:24: error: ‘k1’ was not declared in this scope
22 | annoyance1 += (k1 - x[i]) * (k1 - x[i]);
| ^~
penguingathering.cpp:23:9: error: ‘annoyance2’ was not declared in this scope
23 | annoyance2 += (k2 - x[i]) * (k2 - x[i]);
| ^~~~~~~~~~
penguingathering.cpp:23:24: error: ‘k2’ was not declared in this scope
23 | annoyance2 += (k2 - x[i]) * (k2 - x[i]);
| ^~
penguingathering.cpp:26:17: error: ‘annoyance1’ was not declared in this scope
26 | cout << min(annoyance1, annoyance2) << "\n";
| ^~~~~~~~~~
penguingathering.cpp:26:29: error: ‘annoyance2’ was not declared in this