結果

問題 No.1 道のショートカット
ユーザー 👑 hos.lyrichos.lyric
提出日時 2015-02-20 23:02:20
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 192 bytes
コンパイル時間 76 ms
コンパイル使用メモリ 11,232 KB
実行使用メモリ 23,260 KB
最終ジャッジ日時 2023-09-22 11:59:01
合計ジャッジ時間 5,863 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
15,156 KB
testcase_01 AC 78 ms
15,140 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 105 ms
18,172 KB
testcase_09 AC 86 ms
15,416 KB
testcase_10 AC 98 ms
16,772 KB
testcase_11 AC 108 ms
17,608 KB
testcase_12 AC 163 ms
23,204 KB
testcase_13 AC 163 ms
23,260 KB
testcase_14 WA -
testcase_15 AC 82 ms
15,244 KB
testcase_16 WA -
testcase_17 AC 79 ms
15,144 KB
testcase_18 AC 79 ms
15,084 KB
testcase_19 AC 78 ms
15,252 KB
testcase_20 AC 84 ms
15,408 KB
testcase_21 AC 79 ms
15,020 KB
testcase_22 AC 79 ms
15,232 KB
testcase_23 AC 131 ms
19,048 KB
testcase_24 AC 126 ms
18,776 KB
testcase_25 AC 87 ms
15,676 KB
testcase_26 AC 84 ms
15,340 KB
testcase_27 AC 120 ms
18,876 KB
testcase_28 AC 78 ms
15,084 KB
testcase_29 AC 98 ms
16,564 KB
testcase_30 WA -
testcase_31 AC 92 ms
16,304 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 AC 87 ms
15,264 KB
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 AC 78 ms
15,088 KB
testcase_43 AC 78 ms
15,244 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n,l=(0..2).map{gets.to_i}
f=(0..n).map{{}}
f[1][0]=0
(0..3).map{gets.split.map &:to_i}.transpose.sort.map{|a,b,c,d|f[a].map{|x,t|x>l||f[b][x+c]=[f[b][x+c]||1e9,t+d].min}}
p f[n].values.min||-1
0