Submission #13388
ソースコード
ステータス
コンパイルメッセージ
./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’
セット
テストケース