結果

問題 No.463 魔法使いのすごろく🎲
ユーザー tailstails
提出日時 2016-12-14 01:36:09
言語 Perl
(5.38.2)
結果
AC  
実行時間 1,117 ms / 2,000 ms
コード長 236 bytes
コンパイル時間 441 ms
コンパイル使用メモリ 5,296 KB
実行使用メモリ 5,692 KB
最終ジャッジ日時 2023-08-25 03:03:38
合計ジャッジ時間 9,525 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
5,344 KB
testcase_01 AC 44 ms
5,216 KB
testcase_02 AC 52 ms
5,164 KB
testcase_03 AC 10 ms
5,320 KB
testcase_04 AC 60 ms
5,512 KB
testcase_05 AC 61 ms
5,376 KB
testcase_06 AC 8 ms
5,212 KB
testcase_07 AC 14 ms
5,416 KB
testcase_08 AC 60 ms
5,416 KB
testcase_09 AC 175 ms
5,492 KB
testcase_10 AC 34 ms
5,208 KB
testcase_11 AC 257 ms
5,432 KB
testcase_12 AC 138 ms
5,324 KB
testcase_13 AC 7 ms
5,088 KB
testcase_14 AC 258 ms
5,448 KB
testcase_15 AC 305 ms
5,340 KB
testcase_16 AC 14 ms
5,116 KB
testcase_17 AC 381 ms
5,480 KB
testcase_18 AC 8 ms
5,200 KB
testcase_19 AC 37 ms
5,196 KB
testcase_20 AC 7 ms
5,212 KB
testcase_21 AC 566 ms
5,480 KB
testcase_22 AC 1,117 ms
5,536 KB
testcase_23 AC 1,112 ms
5,480 KB
testcase_24 AC 38 ms
5,484 KB
testcase_25 AC 146 ms
5,648 KB
testcase_26 AC 215 ms
5,584 KB
testcase_27 AC 101 ms
5,484 KB
testcase_28 AC 713 ms
5,480 KB
testcase_29 AC 113 ms
5,516 KB
testcase_30 AC 337 ms
5,468 KB
testcase_31 AC 112 ms
5,688 KB
testcase_32 AC 319 ms
5,412 KB
testcase_33 AC 133 ms
5,692 KB
testcase_34 AC 53 ms
5,420 KB
testcase_35 AC 6 ms
5,260 KB
testcase_36 AC 7 ms
5,168 KB
testcase_37 AC 16 ms
5,416 KB
testcase_38 AC 6 ms
5,148 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

($n,$m)=glob<>;
@c=(0,0,glob<>);
for$i((1..$n-1)x400){
	$e=$f=0;$b=1e99;
	for$j($i+1..$i+$m){
		$k=$n-abs($n-$j);
		$e+=$e[$k]/$m;
		$f+=$f[$k]/$m;
		$b=$f[$k]if$b>$f[$k];
	}
	$e[$i]=$c[$i]+($e<$b?$e:$b);
	$f[$i]=$c[$i]+$f;
}
print$e[1]
0