Problem gotoschool
User lxmine
Submission Time 2026-02-14 11:40:29
Score 0
Max Time N/A
Max Memory N/A

Compile Error

gotoschool.cpp:4:5: error: cannot declare ‘::main’ to be a global variable
4 | int main{
| ^~~~
gotoschool.cpp:5:2: error: expected primary-expression before ‘int’
5 | int n;
| ^~~
gotoschool.cpp:5:2: error: expected ‘}’ before ‘int’
gotoschool.cpp:4:9: note: to match this ‘{’
4 | int main{
| ^
gotoschool.cpp:6:2: error: ‘cin’ does not name a type; did you mean ‘sin’?
6 | cin >> n;
| ^~~
| sin
gotoschool.cpp:7:10: error: ‘n’ was not declared in this scope; did you mean ‘yn’?
7 | int num[n+1], order[n+1];
| ^
| yn
gotoschool.cpp:7:22: error: ‘n’ was not declared in this scope; did you mean ‘yn’?
7 | int num[n+1], order[n+1];
| ^
| yn
gotoschool.cpp:8:2: error: expected unqualified-id before ‘for’
8 | for (int i=1;i<=n;i++){
| ^~~
gotoscho