Problem gotoschool
User lxmine
Submission Time 2026-02-14 11:22:15
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 arr(n);
| ^
| yn
gotoschool.cpp:8:2: error: expected unqualified-id before ‘for’
8 | for (int i=0;i<d;i++){
| ^~~
gotoschool.cpp:8:15: error: ‘i’ does not name a type
8 | for (int i=0;i<d;i++){
| ^
gotoschool.cpp:8:19: error: ‘i’ does not name a type
8 | for (int i=0;i<d;i++){