結果

問題 No.37 遊園地のアトラクション
ユーザー letrangerjpletrangerjp
提出日時 2017-06-14 08:35:03
言語 Ruby
(3.3.0)
結果
AC  
実行時間 886 ms / 5,000 ms
コード長 159 bytes
コンパイル時間 104 ms
コンパイル使用メモリ 7,680 KB
実行使用メモリ 48,268 KB
最終ジャッジ日時 2024-04-18 19:58:44
合計ジャッジ時間 7,970 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 112 ms
14,208 KB
testcase_01 AC 82 ms
12,160 KB
testcase_02 AC 344 ms
28,416 KB
testcase_03 AC 152 ms
16,512 KB
testcase_04 AC 266 ms
22,400 KB
testcase_05 AC 383 ms
28,160 KB
testcase_06 AC 105 ms
13,696 KB
testcase_07 AC 597 ms
34,344 KB
testcase_08 AC 86 ms
12,160 KB
testcase_09 AC 78 ms
12,160 KB
testcase_10 AC 886 ms
48,268 KB
testcase_11 AC 385 ms
28,288 KB
testcase_12 AC 163 ms
16,640 KB
testcase_13 AC 141 ms
15,872 KB
testcase_14 AC 87 ms
12,544 KB
testcase_15 AC 288 ms
23,552 KB
testcase_16 AC 305 ms
24,960 KB
testcase_17 AC 132 ms
14,592 KB
testcase_18 AC 643 ms
44,892 KB
testcase_19 AC 73 ms
12,160 KB
testcase_20 AC 291 ms
23,680 KB
testcase_21 AC 76 ms
12,288 KB
testcase_22 AC 94 ms
12,928 KB
testcase_23 AC 82 ms
12,160 KB
testcase_24 AC 74 ms
12,416 KB
testcase_25 AC 78 ms
12,032 KB
testcase_26 AC 74 ms
12,416 KB
testcase_27 AC 303 ms
25,344 KB
testcase_28 AC 81 ms
12,160 KB
testcase_29 AC 259 ms
22,272 KB
testcase_30 AC 81 ms
12,032 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

eval"T,N,*B="+gets(p).split*?,
B[N..-1].map{|v|9.times{|j|$*<<v/2**j}}
d={}
f=->t,i{d[[t,i]]||=i<N*9?[f[t,i+1],(0>t-=B[i/9])?0:$*[i]+f[t,i+1]].max: 0}
p f[T,0]
0