結果

問題 No.595 登山
ユーザー yuruhiyayuruhiya
提出日時 2021-07-23 11:53:27
言語 Ruby
(3.3.0)
結果
AC  
実行時間 288 ms / 1,500 ms
コード長 122 bytes
コンパイル時間 197 ms
コンパイル使用メモリ 11,488 KB
実行使用メモリ 52,348 KB
最終ジャッジ日時 2023-09-25 10:05:45
合計ジャッジ時間 7,665 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
外部呼び出し有り
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
15,264 KB
testcase_01 AC 79 ms
15,120 KB
testcase_02 AC 80 ms
15,044 KB
testcase_03 AC 80 ms
15,148 KB
testcase_04 AC 262 ms
49,320 KB
testcase_05 AC 131 ms
25,152 KB
testcase_06 AC 239 ms
44,468 KB
testcase_07 AC 95 ms
18,108 KB
testcase_08 AC 106 ms
19,896 KB
testcase_09 AC 241 ms
44,856 KB
testcase_10 AC 198 ms
35,892 KB
testcase_11 AC 178 ms
33,624 KB
testcase_12 AC 91 ms
17,528 KB
testcase_13 AC 125 ms
23,852 KB
testcase_14 AC 249 ms
49,628 KB
testcase_15 AC 253 ms
49,404 KB
testcase_16 AC 257 ms
49,524 KB
testcase_17 AC 253 ms
49,540 KB
testcase_18 AC 249 ms
49,672 KB
testcase_19 AC 284 ms
52,200 KB
testcase_20 AC 278 ms
52,128 KB
testcase_21 AC 282 ms
52,188 KB
testcase_22 AC 282 ms
52,244 KB
testcase_23 AC 288 ms
52,348 KB
testcase_24 AC 81 ms
15,040 KB
testcase_25 AC 81 ms
15,260 KB
testcase_26 AC 288 ms
52,212 KB
testcase_27 AC 268 ms
50,856 KB
testcase_28 AC 261 ms
50,992 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

eval"N,K,*A="+`dd`.split*?,
x,y=0,N*K
A.reduce{x,y=[x+K,y+K,[x+z=_2-_1,x].max].min,[x+K,y+K,z<0?y-z:y].min;_2}
p [x,y].min
0