結果
問題 | No.1307 Rotate and Accumulate |
ユーザー | 👑 testestest |
提出日時 | 2020-12-04 01:00:03 |
言語 | C (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 3,494 ms / 5,000 ms |
コード長 | 229 bytes |
コンパイル時間 | 1,763 ms |
コンパイル使用メモリ | 32,384 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-14 10:53:33 |
合計ジャッジ時間 | 26,414 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
5,248 KB |
testcase_01 | AC | 1 ms
5,376 KB |
testcase_02 | AC | 1 ms
5,376 KB |
testcase_03 | AC | 1 ms
5,376 KB |
testcase_04 | AC | 1 ms
5,376 KB |
testcase_05 | AC | 1 ms
5,376 KB |
testcase_06 | AC | 1 ms
5,376 KB |
testcase_07 | AC | 1 ms
5,376 KB |
testcase_08 | AC | 615 ms
5,376 KB |
testcase_09 | AC | 860 ms
5,376 KB |
testcase_10 | AC | 1,253 ms
5,376 KB |
testcase_11 | AC | 317 ms
5,376 KB |
testcase_12 | AC | 1,192 ms
5,376 KB |
testcase_13 | AC | 88 ms
5,376 KB |
testcase_14 | AC | 316 ms
5,376 KB |
testcase_15 | AC | 3,406 ms
5,376 KB |
testcase_16 | AC | 3,370 ms
5,376 KB |
testcase_17 | AC | 3,419 ms
5,376 KB |
testcase_18 | AC | 2,949 ms
5,376 KB |
testcase_19 | AC | 3,324 ms
5,376 KB |
testcase_20 | AC | 3,494 ms
5,376 KB |
testcase_21 | AC | 1 ms
5,376 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]:a[r+i-n];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]:a[r+i-n];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]:a[r+i-n];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]:a[r+i-n];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]:a[r+i-n];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]:a[r+i-n];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]:a[r+i-n];for(;j<n;printf("%d ",b[j++]));}