Submission #00807
ソースコード
ステータス
コンパイルメッセージ
./Main.cpp:4:9: error: cannot declare ‘::main’ to be a global variable
int main({
^
./Main.cpp:5:5: error: expected primary-expression before ‘int’
int n;
^~~
./Main.cpp:5:5: error: expected ‘}’ before ‘int’
./Main.cpp:4:10: note: to match this ‘{’
int main({
^
./Main.cpp:4:11: error: expected ‘)’ before ‘int’
int main({
~ ^
)
int n;
~~~
./Main.cpp:6:5: error: ‘cin’ does not name a type; did you mean ‘main’?
cin >> n;
^~~
main
./Main.cpp:7:11: error: ‘n’ was not declared in this scope
int x[n + 1];
^
./Main.cpp:8:5: error: ‘x’ does not name a type
x[n] = 2020;
^
./Main.cpp:11:5: error: expected unqualified-id before ‘for’
for(int i = 0; i < n; i++){
^~~
./Main.cpp:11:20: error: ‘i’ does not name a type
for(int i = 0; i < n; i++){
^
./Main.cpp:11:27: error: ‘i’ does not name a type
for(int i = 0; i < n; i++){
^
./Main.cpp:16:5: error: ‘cin’ does not name a type; did you mean ‘main’?
cin >> m;
^~~
main
./Main.cpp:17:12: error: array bound is not an integer constant before ‘]’ token
int a[m];
^
./Main.cpp:19:5: error: expected unqualified-id before ‘for’
for(int i = 0; i < m; i++){
^~~
./Main.cpp:19:20: error: ‘i’ does not name a type
for(int i = 0; i < m; i++){
^
./Main.cpp:19:27: error: ‘i’ does not name a type
for(int i = 0; i < m; i++){
^
./Main.cpp:24:5: error: expected unqualified-id before ‘for’
for(int i = 0; i < m; i++){
^~~
./Main.cpp:24:20: error: ‘i’ does not name a type
for(int i = 0; i < m; i++){
^
./Main.cpp:24:27: error: ‘i’ does not name a type
for(int i = 0; i < m; i++){
^
./Main.cpp:31:5: error: expected unqualified-id before ‘for’
for(int i = 0; i < n; i++){
^~~
./Main.cpp:31:20: error: ‘i’ does not name a type
for(int i = 0; i < n; i++){
^
./Main.cpp:31:27: error: ‘i’ does not name a type
for(int i = 0; i < n; i++){
^
./Main.cpp:35:5: error: expected unqualified-id before ‘return’
return(0);
^~~~~~
./Main.cpp:36:1: error: expected declaration before ‘}’ token
}
^
セット
テストケース