結果

問題 No.1 道のショートカット
コンテスト
ユーザー 👑 tails
提出日時 2016-12-15 18:21:51
言語 Perl
(5.42.1)
コンパイル:
perl -cw _filename_
実行:
perl -X _filename_
結果
AC  
実行時間 16 ms / 5,000 ms
コード長 159 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 322 ms
コンパイル使用メモリ 8,104 KB
実行使用メモリ 13,696 KB
最終ジャッジ日時 2026-04-03 01:24:06
合計ジャッジ時間 1,606 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 40
権限があれば一括ダウンロードができます
コンパイルメッセージ
Possible unintended interpolation of @P in string at Main.pl line 1.
Name "main::V" used only once: possible typo at Main.pl line 1.
Name "main::Q" used only once: possible typo at Main.pl line 1.
Name "main::P" used only once: possible typo at Main.pl line 1.
Name "main::U" used only once: possible typo at Main.pl line 1.
Name "main::T" used only once: possible typo at Main.pl line 1.
Main.pl syntax OK

ソースコード

diff #
raw source code

@$_=glob<>for P..V;@a=[1,@Q];$t++while@a=map{($i,$c,$w)=@$_;$c<0?():$w-$t?$_:$i-"@P"?map$S[$_]-$i?():[$T[$_],$c-$U[$_],$V[$_]+$t],0..@S:exit!print$t}@a;print-1
0