結果

問題 No.45 回転寿司
ユーザー %20%20
提出日時 2017-03-03 18:18:05
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 132 bytes
コンパイル時間 351 ms
コンパイル使用メモリ 5,332 KB
実行使用メモリ 5,484 KB
最終ジャッジ日時 2023-09-04 05:46:43
合計ジャッジ時間 2,111 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 7 ms
5,244 KB
testcase_01 AC 7 ms
5,336 KB
testcase_02 AC 8 ms
5,484 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 6 ms
5,252 KB
testcase_06 AC 7 ms
5,280 KB
testcase_07 WA -
testcase_08 AC 7 ms
5,160 KB
testcase_09 AC 8 ms
5,268 KB
testcase_10 AC 7 ms
5,148 KB
testcase_11 AC 7 ms
5,228 KB
testcase_12 WA -
testcase_13 AC 7 ms
5,212 KB
testcase_14 WA -
testcase_15 AC 7 ms
5,260 KB
testcase_16 AC 7 ms
5,360 KB
testcase_17 AC 7 ms
5,148 KB
testcase_18 AC 7 ms
5,260 KB
testcase_19 AC 8 ms
5,324 KB
testcase_20 AC 6 ms
5,168 KB
testcase_21 AC 6 ms
5,168 KB
testcase_22 AC 6 ms
5,316 KB
testcase_23 AC 6 ms
5,040 KB
testcase_24 AC 6 ms
5,120 KB
testcase_25 AC 6 ms
5,244 KB
testcase_26 AC 8 ms
5,124 KB
testcase_27 AC 8 ms
5,460 KB
testcase_28 AC 7 ms
5,316 KB
testcase_29 WA -
testcase_30 AC 7 ms
5,272 KB
testcase_31 AC 6 ms
5,124 KB
testcase_32 WA -
testcase_33 AC 8 ms
5,344 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

sub max{$_[$_[1]>$_[0]]}
$N=<>;
@V=glob<>;
@d=(@V[0,1],$V[0]+$V[2]);
$d[$_]=max($d[$_-3],$d[$_-2])+$V[$_]for 3..$N-1;
print$d[$N-1]
0