結果
問題 | No.463 魔法使いのすごろく🎲 |
ユーザー | tails |
提出日時 | 2016-12-14 00:42:01 |
言語 | C90 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 456 bytes |
コンパイル時間 | 237 ms |
コンパイル使用メモリ | 21,760 KB |
実行使用メモリ | 8,220 KB |
最終ジャッジ日時 | 2024-05-07 10:09:35 |
合計ジャッジ時間 | 11,513 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 323 ms
5,248 KB |
testcase_01 | AC | 77 ms
5,376 KB |
testcase_02 | AC | 100 ms
5,376 KB |
testcase_03 | AC | 10 ms
5,376 KB |
testcase_04 | AC | 97 ms
5,376 KB |
testcase_05 | AC | 98 ms
5,376 KB |
testcase_06 | AC | 3 ms
5,376 KB |
testcase_07 | AC | 19 ms
5,376 KB |
testcase_08 | AC | 110 ms
5,376 KB |
testcase_09 | AC | 327 ms
5,376 KB |
testcase_10 | AC | 57 ms
5,376 KB |
testcase_11 | AC | 637 ms
5,376 KB |
testcase_12 | AC | 347 ms
5,376 KB |
testcase_13 | AC | 2 ms
5,376 KB |
testcase_14 | AC | 522 ms
5,376 KB |
testcase_15 | AC | 764 ms
5,376 KB |
testcase_16 | AC | 14 ms
5,376 KB |
testcase_17 | AC | 1,000 ms
5,376 KB |
testcase_18 | AC | 3 ms
5,376 KB |
testcase_19 | AC | 76 ms
5,376 KB |
testcase_20 | WA | - |
testcase_21 | AC | 1,458 ms
5,376 KB |
testcase_22 | TLE | - |
testcase_23 | TLE | - |
testcase_24 | AC | 90 ms
5,376 KB |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | AC | 1,772 ms
5,376 KB |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | WA | - |
testcase_32 | WA | - |
testcase_33 | WA | - |
testcase_34 | WA | - |
testcase_35 | AC | 1 ms
5,376 KB |
testcase_36 | AC | 3 ms
5,376 KB |
testcase_37 | AC | 20 ms
5,376 KB |
testcase_38 | AC | 1 ms
5,376 KB |
コンパイルメッセージ
main.c:3:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 3 | main(n,m,h,i,j,k){ | ^~~~ main.c: In function ‘main’: main.c:3:1: warning: type of ‘n’ defaults to ‘int’ [-Wimplicit-int] main.c:3:1: warning: type of ‘m’ defaults to ‘int’ [-Wimplicit-int] main.c:3:1: warning: type of ‘h’ defaults to ‘int’ [-Wimplicit-int] main.c:3:1: warning: type of ‘i’ defaults to ‘int’ [-Wimplicit-int] main.c:3:1: warning: type of ‘j’ defaults to ‘int’ [-Wimplicit-int] main.c:3:1: warning: type of ‘k’ defaults to ‘int’ [-Wimplicit-int] main.c:5:9: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 5 | scanf("%d%d",&n,&m); | ^~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ +++ |+#include <stdio.h> 1 | double c[110],e0[110],e1[110]; main.c:5:9: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch] 5 | scanf("%d%d",&n,&m); | ^~~~~ main.c:5:9: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ main.c:29:9: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration] 29 | printf("%.10f\n",e0[1]); | ^~~~~~ main.c:29:9: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:29:9: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] main.c:29:9: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
ソースコード
double c[110],e0[110],e1[110]; main(n,m,h,i,j,k){ scanf("%d%d",&n,&m); for(i=2;i<n;++i){ scanf("%lf",&c[i]); } for(h=0;h<100000;++h){ for(i=n;--i;){ e0[i]=0; e1[i]=0; for(j=i+1;j<=i+m;++j){ k=j<n?j:n*2-j; e0[i]+=e0[k]+c[k]; e1[i]+=e1[k]+c[k]; } e0[i]/=m; e1[i]/=m; for(j=i+1;j<=i+m;++j){ k=j<n?j:n*2-j; if(e0[i]>e1[k]+c[k]){ e0[i]=e1[k]+c[k]; } } } } printf("%.10f\n",e0[1]); return 0; }