Submission #67203
ソースコード
ステータス
コンパイルメッセージ
./Main.c:2:11: error: expected declaration specifiers or ‘...’ before string constant
scanf("%lld",&n);
^~~~~~
./Main.c:2:18: error: expected declaration specifiers or ‘...’ before ‘&’ token
scanf("%lld",&n);
^
./Main.c:3:15: error: variably modified ‘a’ at file scope
long long a[n],sum[n+1];
^
./Main.c:3:20: error: variably modified ‘sum’ at file scope
long long a[n],sum[n+1];
^~~
./Main.c:4:5: error: expected identifier or ‘(’ before ‘for’
for(i=0;i<n;i++){
^~~
./Main.c:4:14: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token
for(i=0;i<n;i++){
^
./Main.c:4:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘++’ token
for(i=0;i<n;i++){
^~
./Main.c:7:5: warning: data definition has no type or storage class
sum[0]=0;
^~~
./Main.c:7:5: warning: type defaults to ‘int’ in declaration of ‘sum’ [-Wimplicit-int]
./Main.c:7:5: error: conflicting types for ‘sum’
./Main.c:3:20: note: previous declaration of ‘sum’ was here
long long a[n],sum[n+1];
^~~
./Main.c:7:12: error: invalid initializer
sum[0]=0;
^
./Main.c:8:5: error: expected identifier or ‘(’ before ‘for’
for(i=1;i<=n;i++){
^~~
./Main.c:8:14: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<=’ token
for(i=1;i<=n;i++){
^~
./Main.c:8:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘++’ token
for(i=1;i<=n;i++){
^~
./Main.c:11:11: error: expected declaration specifiers or ‘...’ before string constant
scanf("%lld",&q);
^~~~~~
./Main.c:11:18: error: expected declaration specifiers or ‘...’ before ‘&’ token
scanf("%lld",&q);
^
./Main.c:12:15: error: variably modified ‘x’ at file scope
long long x[q];
^
./Main.c:13:5: error: expected identifier or ‘(’ before ‘for’
for(i=0;i<q;i++){
^~~
./Main.c:13:14: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token
for(i=0;i<q;i++){
^
./Main.c:13:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘++’ token
for(i=0;i<q;i++){
^~
./Main.c:17:5: error: expected identifier or ‘(’ before ‘for’
for(i=0;i<q;i++){
^~~
./Main.c:17:14: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token
for(i=0;i<q;i++){
^
./Main.c:17:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘++’ token
for(i=0;i<q;i++){
^~
./Main.c:20:5: error: expected identifier or ‘(’ before ‘return’
return(0);
^~~~~~
セット
テストケース