結果
問題 | No.1307 Rotate and Accumulate |
ユーザー | 👑 testestest |
提出日時 | 2020-12-04 00:59:07 |
言語 | C (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 229 bytes |
コンパイル時間 | 384 ms |
コンパイル使用メモリ | 32,640 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-14 10:52:04 |
合計ジャッジ時間 | 27,634 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
6,812 KB |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | AC | 2,525 ms
6,940 KB |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | AC | 1 ms
6,944 KB |
コンパイルメッセージ
main.c:3:1: warning: data definition has no type or storage class 3 | a[1<<17],b[1<<17],i,j,r;main(n){for(scanf("%d%*d",&n);i<n;scanf("%d",a+i++));for(;~scanf("%d",&r);)for(i=0;i<n;i++)b[i]+=i>n-r?a[r+i-n]:a[r+i];for(;j<n;printf("%d ",b[j++]));} | ^ main.c:3:1: warning: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] main.c:3:10: warning: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] 3 | a[1<<17],b[1<<17],i,j,r;main(n){for(scanf("%d%*d",&n);i<n;scanf("%d",a+i++));for(;~scanf("%d",&r);)for(i=0;i<n;i++)b[i]+=i>n-r?a[r+i-n]:a[r+i];for(;j<n;printf("%d ",b[j++]));} | ^ main.c:3:19: warning: type defaults to 'int' in declaration of 'i' [-Wimplicit-int] 3 | a[1<<17],b[1<<17],i,j,r;main(n){for(scanf("%d%*d",&n);i<n;scanf("%d",a+i++));for(;~scanf("%d",&r);)for(i=0;i<n;i++)b[i]+=i>n-r?a[r+i-n]:a[r+i];for(;j<n;printf("%d ",b[j++]));} | ^ main.c:3:21: warning: type defaults to 'int' in declaration of 'j' [-Wimplicit-int] 3 | a[1<<17],b[1<<17],i,j,r;main(n){for(scanf("%d%*d",&n);i<n;scanf("%d",a+i++));for(;~scanf("%d",&r);)for(i=0;i<n;i++)b[i]+=i>n-r?a[r+i-n]:a[r+i];for(;j<n;printf("%d ",b[j++]));} | ^ main.c:3:23: warning: type defaults to 'int' in declaration of 'r' [-Wimplicit-int] 3 | a[1<<17],b[1<<17],i,j,r;main(n){for(scanf("%d%*d",&n);i<n;scanf("%d",a+i++));for(;~scanf("%d",&r);)for(i=0;i<n;i++)b[i]+=i>n-r?a[r+i-n]:a[r+i];for(;j<n;printf("%d ",b[j++]));} | ^ main.c:3:25: warning: return type defaults to 'int' [-Wimplicit-int] 3 | a[1<<17],b[1<<17],i,j,r;main(n){for(scanf("%d%*d",&n);i<n;scanf("%d",a+i++));for(;~scanf("%d",&r);)for(i=0;i<n;i++)b[i]+=i>n-r?a[r+i-n]:a[r+i];for(;j<n;printf("%d ",b[j++]));} | ^~~~ main.c: In function 'main': main.c:3:25: warning: type of 'n' defaults to 'int' [-Wimplicit-int] main.c:3:37: warning: implicit declaration of function 'scanf' [-Wimplicit-function-decla
ソースコード
#pragma GCC target("avx2") #pragma GCC optimize("O3") a[1<<17],b[1<<17],i,j,r;main(n){for(scanf("%d%*d",&n);i<n;scanf("%d",a+i++));for(;~scanf("%d",&r);)for(i=0;i<n;i++)b[i]+=i>n-r?a[r+i-n]:a[r+i];for(;j<n;printf("%d ",b[j++]));}