Problem smurf
User mth4z
Submission Time 2024-04-29 17:16:01
Score 0
Max Time N/A
Max Memory N/A

Compile Error

smurf.cpp:6:1: error: cannot declare ‘::main’ to be a global variable
6 | cin << n;
| ^~~
smurf.cpp:6:8: error: ‘n’ was not declared in this scope; did you mean ‘yn’?
6 | cin << n;
| ^
| yn
smurf.cpp:11:1: error: expected unqualified-id before ‘for’
11 | for (int i = 0; i < n; i++){
| ^~~
smurf.cpp:11:17: error: ‘i’ does not name a type
11 | for (int i = 0; i < n; i++){
| ^
smurf.cpp:11:24: error: ‘i’ does not name a type
11 | for (int i = 0; i < n; i++){
| ^
smurf.cpp:26:3: error: expected unqualified-id before ‘if’
26 | if (reversed){
| ^~
smurf.cpp:33:9: error: expected unqualified-id before ‘else’
33 | } else {
| ^~~~
smurf.cpp:39:3: error: expected declaration before ‘}’ token
39 | }
| ^