結果

問題 No.37 遊園地のアトラクション
ユーザー letrangerjpletrangerjp
提出日時 2017-06-14 08:34:30
言語 Ruby
(3.3.0)
結果
AC  
実行時間 949 ms / 5,000 ms
コード長 156 bytes
コンパイル時間 50 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 48,224 KB
最終ジャッジ日時 2024-04-18 19:55:17
合計ジャッジ時間 7,889 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
外部呼び出し有り
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
14,208 KB
testcase_01 AC 84 ms
12,288 KB
testcase_02 AC 356 ms
28,416 KB
testcase_03 AC 151 ms
16,512 KB
testcase_04 AC 261 ms
22,272 KB
testcase_05 AC 379 ms
28,416 KB
testcase_06 AC 109 ms
13,824 KB
testcase_07 AC 575 ms
34,100 KB
testcase_08 AC 83 ms
12,416 KB
testcase_09 AC 77 ms
12,288 KB
testcase_10 AC 949 ms
48,224 KB
testcase_11 AC 355 ms
28,288 KB
testcase_12 AC 155 ms
16,768 KB
testcase_13 AC 133 ms
15,872 KB
testcase_14 AC 100 ms
12,416 KB
testcase_15 AC 297 ms
23,424 KB
testcase_16 AC 308 ms
25,088 KB
testcase_17 AC 132 ms
14,720 KB
testcase_18 AC 640 ms
44,912 KB
testcase_19 AC 82 ms
12,288 KB
testcase_20 AC 281 ms
23,808 KB
testcase_21 AC 75 ms
12,160 KB
testcase_22 AC 96 ms
12,928 KB
testcase_23 AC 74 ms
12,160 KB
testcase_24 AC 75 ms
12,160 KB
testcase_25 AC 81 ms
12,288 KB
testcase_26 AC 76 ms
12,160 KB
testcase_27 AC 309 ms
25,216 KB
testcase_28 AC 78 ms
12,288 KB
testcase_29 AC 264 ms
22,272 KB
testcase_30 AC 78 ms
12,288 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

eval"T,N,*B="+`dd`.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