Problem | penguingathering |
---|---|
User | blob |
Submission Time | 2023-12-09 11:30:06 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
penguingathering.cpp: In function ‘int main()’:
penguingathering.cpp:16:31: error: expected ‘;’ before ‘{’ token
16 | if (int median = (N % 2 == 0){
| ^
| ;
penguingathering.cpp:16:31: error: expected primary-expression before ‘{’ token
penguingathering.cpp:16:31: error: expected ‘)’ before ‘{’ token
16 | if (int median = (N % 2 == 0){
| ~ ^
| )
penguingathering.cpp:26:9: error: ‘minAnnoyance’ was not declared in this scope
26 | minAnnoyance += abs(median - penguins[i]);
| ^~~~~~~~~~~~
penguingathering.cpp:26:29: error: ‘median’ was not declared in this scope
26 | minAnnoyance += abs(median - penguins[i]);
| ^~~~~~
penguingathering.cpp:29:13: error: ‘minAnnoyance’ was not declared in this scope
29 | cout <<