Submission #13388


ソースコード

ステータス

項目 データ
問題 0649 - 区間和(セグ木、BIT練習)
ユーザー名 kotatsugame
投稿日時 2017-03-08 04:52:42
言語 C
状態 Compile Error
得点 0
ソースコード長 181 Byte
最大実行時間 -
最大メモリ使用量

コンパイルメッセージ

./Main.c:1:17: warning: return type defaults to ‘int’ [-Wimplicit-int]
 long a[1<<21],n;main(s,b,c){for(gets(b);~scanf("%d%d%d",&s,&b,&c);)if(s){for(n=0;c;c-=-c&c)n+=a[c];for(b--;b;b-=-b&b)n-=a[b];printf("%ld\n",n);}else for(;b<1<<21;b+=-b&b)a[b]+=c;}
                 ^
./Main.c: In function ‘main’:
./Main.c:1:17: warning: type of ‘s’ defaults to ‘int’ [-Wimplicit-int]
./Main.c:1:17: warning: type of ‘b’ defaults to ‘int’ [-Wimplicit-int]
./Main.c:1:17: warning: type of ‘c’ defaults to ‘int’ [-Wimplicit-int]
./Main.c:1:33: warning: implicit declaration of function ‘gets’ [-Wimplicit-function-declaration]
 long a[1<<21],n;main(s,b,c){for(gets(b);~scanf("%d%d%d",&s,&b,&c);)if(s){for(n=0;c;c-=-c&c)n+=a[c];for(b--;b;b-=-b&b)n-=a[b];printf("%ld\n",n);}else for(;b<1<<21;b+=-b&b)a[b]+=c;}
                                 ^
./Main.c:1:1: error: stray ‘\357’ in program
 long a[1<<21],n;main(s,b,c){for(gets(b);~scanf("%d%d%d",&s,&b,&c);)if(s){for(n=0;c;c-=-c&c)n+=a[c];for(b--;b;b-=-b&b)n-=a[b];printf("%ld\n",n);}else for(;b<1<<21;b+=-b&b)a[b]+=c;}
 ^
./Main.c:1:1: error: stray ‘\275’ in program
./Main.c:1:1: error: stray ‘\202’ in program
./Main.c:1:44: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration]
 long a[1<<21],n;main(s,b,c){for(gets(b);~scanf("%d%d%d",&s,&b,&c);)if(s){for(n=0;c;c-=-c&c)n+=a[c];for(b--;b;b-=-b&b)n-=a[b];printf("%ld\n",n);}else for(;b<1<<21;b+=-b&b)a[b]+=c;}
                                            ^
./Main.c:1:44: warning: incompatible implicit declaration of built-in function ‘scanf’
./Main.c:1:44: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
./Main.c:1:128: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
 long a[1<<21],n;main(s,b,c){for(gets(b);~scanf("%d%d%d",&s,&b,&c);)if(s){for(n=0;c;c-=-c&c)n+=a[c];for(b--;b;b-=-b&b)n-=a[b];printf("%ld\n",n);}else for(;b<1<<21;b+=-b&b)a[b]+=c;}
                                                                                                                                ^
./Main.c:1:128: warning: incompatible implicit declaration of built-in function ‘printf’
./Main.c:1:128: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’

セット

セット 得点 Cases

テストケース

ファイル名 状態 実行時間 メモリ使用量 #