結果

問題 No.409 ダイエット
ユーザー cielciel
提出日時 2016-08-03 15:58:00
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 150 bytes
コンパイル時間 191 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 71,296 KB
最終ジャッジ日時 2024-04-24 15:14:05
合計ジャッジ時間 30,449 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 95 ms
17,664 KB
testcase_01 AC 90 ms
12,160 KB
testcase_02 AC 91 ms
12,160 KB
testcase_03 AC 89 ms
12,160 KB
testcase_04 AC 90 ms
12,288 KB
testcase_05 AC 89 ms
12,032 KB
testcase_06 AC 91 ms
12,160 KB
testcase_07 AC 89 ms
12,032 KB
testcase_08 AC 89 ms
12,288 KB
testcase_09 AC 90 ms
12,032 KB
testcase_10 AC 89 ms
12,288 KB
testcase_11 AC 89 ms
12,160 KB
testcase_12 AC 92 ms
12,160 KB
testcase_13 AC 88 ms
12,032 KB
testcase_14 AC 90 ms
12,160 KB
testcase_15 AC 91 ms
12,160 KB
testcase_16 AC 90 ms
12,160 KB
testcase_17 AC 89 ms
12,160 KB
testcase_18 AC 91 ms
12,160 KB
testcase_19 AC 90 ms
12,160 KB
testcase_20 AC 89 ms
12,160 KB
testcase_21 AC 91 ms
12,288 KB
testcase_22 AC 90 ms
12,160 KB
testcase_23 AC 91 ms
12,288 KB
testcase_24 AC 91 ms
12,160 KB
testcase_25 AC 89 ms
12,160 KB
testcase_26 AC 91 ms
12,160 KB
testcase_27 AC 90 ms
12,288 KB
testcase_28 AC 90 ms
12,288 KB
testcase_29 AC 91 ms
12,288 KB
testcase_30 AC 88 ms
12,032 KB
testcase_31 AC 90 ms
12,160 KB
testcase_32 AC 90 ms
12,160 KB
testcase_33 AC 91 ms
12,160 KB
testcase_34 AC 88 ms
12,288 KB
testcase_35 AC 904 ms
39,552 KB
testcase_36 AC 1,078 ms
40,448 KB
testcase_37 AC 1,024 ms
40,320 KB
testcase_38 AC 1,009 ms
40,064 KB
testcase_39 AC 948 ms
39,936 KB
testcase_40 AC 1,077 ms
40,320 KB
testcase_41 AC 1,222 ms
40,960 KB
testcase_42 AC 1,152 ms
40,832 KB
testcase_43 AC 1,004 ms
39,936 KB
testcase_44 AC 911 ms
39,808 KB
testcase_45 AC 1,086 ms
40,576 KB
testcase_46 AC 1,104 ms
40,704 KB
testcase_47 AC 1,075 ms
40,448 KB
testcase_48 AC 939 ms
39,808 KB
testcase_49 AC 1,146 ms
40,704 KB
testcase_50 AC 1,056 ms
40,448 KB
testcase_51 AC 1,092 ms
40,704 KB
testcase_52 AC 1,168 ms
40,704 KB
testcase_53 AC 1,138 ms
40,576 KB
testcase_54 AC 903 ms
39,808 KB
testcase_55 TLE -
testcase_56 -- -
testcase_57 -- -
testcase_58 -- -
testcase_59 -- -
testcase_60 -- -
testcase_61 -- -
testcase_62 -- -
testcase_63 -- -
testcase_64 -- -
testcase_65 -- -
testcase_66 -- -
testcase_67 -- -
testcase_68 -- -
testcase_69 -- -
testcase_70 -- -
testcase_71 -- -
testcase_72 -- -
testcase_73 -- -
testcase_74 -- -
testcase_75 -- -
testcase_76 -- -
testcase_77 -- -
testcase_78 -- -
testcase_79 -- -
testcase_80 -- -
testcase_81 -- -
testcase_82 -- -
testcase_83 -- -
testcase_84 -- -
testcase_85 -- -
testcase_86 -- -
testcase_87 -- -
testcase_88 -- -
testcase_89 -- -
testcase_90 -- -
testcase_91 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

#!/usr/bin/ruby
N,A,B,W,*D=`dd`.split.map(&:to_i)
D<<0
R=[W]
1.upto(N+1){|k|
	R<<k.times.map{|i|D[k-1]+R[i]-(k-i-1)*A+(k-i-1)*(k-i)/2*B}.min
}
p R[-1]
0