結果
問題 | No.1307 Rotate and Accumulate |
ユーザー | 👑 testestest |
提出日時 | 2020-12-04 01:41:15 |
言語 | C (gcc 12.3.0) |
結果 |
TLE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 198 bytes |
コンパイル時間 | 286 ms |
コンパイル使用メモリ | 32,256 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-14 11:58:54 |
合計ジャッジ時間 | 39,540 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
5,248 KB |
testcase_01 | AC | 1 ms
5,248 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 | 921 ms
5,376 KB |
testcase_09 | AC | 1,364 ms
5,376 KB |
testcase_10 | AC | 1,979 ms
5,376 KB |
testcase_11 | AC | 493 ms
5,376 KB |
testcase_12 | AC | 1,883 ms
5,376 KB |
testcase_13 | AC | 132 ms
5,376 KB |
testcase_14 | AC | 491 ms
5,376 KB |
testcase_15 | TLE | - |
testcase_16 | TLE | - |
testcase_17 | TLE | - |
testcase_18 | TLE | - |
testcase_19 | TLE | - |
testcase_20 | AC | 4,802 ms
5,376 KB |
testcase_21 | AC | 1 ms
5,376 KB |
コンパイルメッセージ
main.c:2:1: warning: data definition has no type or storage class 2 | a[1<<18],i,r;main(n){for(scanf("%d%*d",&n);i<n;scanf("%d",a+i++));for(;~scanf("%d",&r);)for(i=0;i<n;i++)a[n+i]+=i<n-r?a[r+i]:a[r+i-n];for(;i<n+n;printf("%d ",a[i++]));} | ^ main.c:2:1: warning: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] main.c:2:10: warning: type defaults to 'int' in declaration of 'i' [-Wimplicit-int] 2 | a[1<<18],i,r;main(n){for(scanf("%d%*d",&n);i<n;scanf("%d",a+i++));for(;~scanf("%d",&r);)for(i=0;i<n;i++)a[n+i]+=i<n-r?a[r+i]:a[r+i-n];for(;i<n+n;printf("%d ",a[i++]));} | ^ main.c:2:12: warning: type defaults to 'int' in declaration of 'r' [-Wimplicit-int] 2 | a[1<<18],i,r;main(n){for(scanf("%d%*d",&n);i<n;scanf("%d",a+i++));for(;~scanf("%d",&r);)for(i=0;i<n;i++)a[n+i]+=i<n-r?a[r+i]:a[r+i-n];for(;i<n+n;printf("%d ",a[i++]));} | ^ main.c:2:14: warning: return type defaults to 'int' [-Wimplicit-int] 2 | a[1<<18],i,r;main(n){for(scanf("%d%*d",&n);i<n;scanf("%d",a+i++));for(;~scanf("%d",&r);)for(i=0;i<n;i++)a[n+i]+=i<n-r?a[r+i]:a[r+i-n];for(;i<n+n;printf("%d ",a[i++]));} | ^~~~ main.c: In function 'main': main.c:2:14: warning: type of 'n' defaults to 'int' [-Wimplicit-int] main.c:2:26: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 2 | a[1<<18],i,r;main(n){for(scanf("%d%*d",&n);i<n;scanf("%d",a+i++));for(;~scanf("%d",&r);)for(i=0;i<n;i++)a[n+i]+=i<n-r?a[r+i]:a[r+i-n];for(;i<n+n;printf("%d ",a[i++]));} | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | #pragma GCC optimize("Ofast") main.c:2:26: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 2 | a[1<<18],i,r;main(n){for(scanf("%d%*d",&n);i<n;scanf("%d",a+i++));for(;~scanf("%d",&r);)for(i=0;i<n;i++)a[n+i]+=i<n-r?a[r+i]:a[r+i-n];for(;i<n+n;printf("%d
ソースコード
#pragma GCC optimize("Ofast") a[1<<18],i,r;main(n){for(scanf("%d%*d",&n);i<n;scanf("%d",a+i++));for(;~scanf("%d",&r);)for(i=0;i<n;i++)a[n+i]+=i<n-r?a[r+i]:a[r+i-n];for(;i<n+n;printf("%d ",a[i++]));}