結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
15,288 KB
testcase_01 AC 84 ms
15,060 KB
testcase_02 AC 82 ms
15,320 KB
testcase_03 AC 80 ms
15,320 KB
testcase_04 AC 283 ms
49,140 KB
testcase_05 AC 141 ms
25,064 KB
testcase_06 AC 255 ms
44,616 KB
testcase_07 AC 98 ms
18,096 KB
testcase_08 AC 112 ms
20,040 KB
testcase_09 AC 257 ms
44,924 KB
testcase_10 AC 209 ms
35,772 KB
testcase_11 AC 194 ms
33,472 KB
testcase_12 AC 96 ms
17,424 KB
testcase_13 AC 134 ms
23,728 KB
testcase_14 AC 271 ms
49,644 KB
testcase_15 AC 275 ms
49,468 KB
testcase_16 AC 274 ms
49,404 KB
testcase_17 AC 275 ms
49,656 KB
testcase_18 AC 275 ms
49,448 KB
testcase_19 AC 307 ms
52,368 KB
testcase_20 AC 305 ms
52,204 KB
testcase_21 AC 311 ms
52,320 KB
testcase_22 AC 305 ms
52,376 KB
testcase_23 AC 310 ms
52,152 KB
testcase_24 AC 84 ms
15,320 KB
testcase_25 AC 83 ms
15,252 KB
testcase_26 AC 310 ms
52,308 KB
testcase_27 AC 289 ms
50,972 KB
testcase_28 AC 287 ms
50,872 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

eval"N,K,*A="+`dd`.split*?,
y=N*K;a=A[x=0]
A.map{x,y,a=[x+K,y+K,(z=_1-a)>0?x+z:x].min,[x+K,y+K,z<0?y-z:y].min,_1}
p x<y ?x:y
0