結果

問題 No.463 魔法使いのすごろく🎲
ユーザー tailstails
提出日時 2016-12-14 00:29:41
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 374 bytes
コンパイル時間 618 ms
コンパイル使用メモリ 6,944 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-05-07 10:03:42
合計ジャッジ時間 4,734 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
6,812 KB
testcase_01 AC 23 ms
6,940 KB
testcase_02 AC 27 ms
6,940 KB
testcase_03 AC 9 ms
6,940 KB
testcase_04 AC 29 ms
6,944 KB
testcase_05 AC 27 ms
6,940 KB
testcase_06 AC 8 ms
6,940 KB
testcase_07 AC 10 ms
6,944 KB
testcase_08 AC 30 ms
6,940 KB
testcase_09 AC 73 ms
6,940 KB
testcase_10 AC 19 ms
6,944 KB
testcase_11 AC 118 ms
6,944 KB
testcase_12 AC 63 ms
6,940 KB
testcase_13 AC 8 ms
6,944 KB
testcase_14 AC 110 ms
6,940 KB
testcase_15 AC 131 ms
6,944 KB
testcase_16 AC 10 ms
6,944 KB
testcase_17 AC 163 ms
6,944 KB
testcase_18 AC 8 ms
6,944 KB
testcase_19 AC 21 ms
6,940 KB
testcase_20 WA -
testcase_21 AC 247 ms
6,944 KB
testcase_22 AC 476 ms
6,944 KB
testcase_23 AC 467 ms
6,940 KB
testcase_24 AC 18 ms
6,940 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 302 ms
6,940 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 AC 8 ms
6,944 KB
testcase_36 AC 8 ms
6,944 KB
testcase_37 AC 12 ms
6,944 KB
testcase_38 AC 8 ms
6,944 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

($n,$m)=glob<>;
@c=(0,0,glob<>);
for(1..100){
	for$i(reverse 1..$n-1){
		$e0[$i]=0;
		$e1[$i]=0;
		for$j(1..$m){
			$k=$i+$j<$n?$i+$j:$n*2-($i+$j);
			$e0[$i]+=$e0[$k]+$c[$k];
			$e1[$i]+=$e1[$k]+$c[$k];
		}
		$e0[$i]/=$m;
		$e1[$i]/=$m;
		for$j(1..$m){
			$k=$i+$j<$n?$i+$j:$n*2-($i+$j);
			if($e0[$i]>$e1[$k]+$c[$k]){
				$e0[$i]=$e1[$k]+$c[$k];
			}
		}
	}
}
print$e0[1];
0