結果

問題 No.710 チーム戦
ユーザー %20%20
提出日時 2018-12-09 21:20:39
言語 Ruby
(3.3.0)
結果
AC  
実行時間 1,333 ms / 3,000 ms
コード長 149 bytes
コンパイル時間 358 ms
コンパイル使用メモリ 11,512 KB
実行使用メモリ 16,920 KB
最終ジャッジ日時 2023-10-14 21:54:29
合計ジャッジ時間 32,025 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
16,620 KB
testcase_01 AC 152 ms
16,620 KB
testcase_02 AC 1,327 ms
16,776 KB
testcase_03 AC 1,302 ms
16,600 KB
testcase_04 AC 1,308 ms
16,716 KB
testcase_05 AC 1,310 ms
16,712 KB
testcase_06 AC 1,315 ms
16,628 KB
testcase_07 AC 1,312 ms
16,872 KB
testcase_08 AC 1,309 ms
16,776 KB
testcase_09 AC 1,304 ms
16,620 KB
testcase_10 AC 1,307 ms
16,756 KB
testcase_11 AC 1,312 ms
16,632 KB
testcase_12 AC 1,305 ms
16,840 KB
testcase_13 AC 1,306 ms
16,868 KB
testcase_14 AC 1,308 ms
16,888 KB
testcase_15 AC 1,310 ms
16,708 KB
testcase_16 AC 1,320 ms
16,920 KB
testcase_17 AC 1,305 ms
16,896 KB
testcase_18 AC 1,308 ms
16,728 KB
testcase_19 AC 1,308 ms
16,716 KB
testcase_20 AC 1,333 ms
16,876 KB
testcase_21 AC 1,301 ms
16,776 KB
testcase_22 AC 1,297 ms
16,732 KB
testcase_23 AC 1,314 ms
16,740 KB
testcase_24 AC 1,297 ms
16,856 KB
testcase_25 AC 101 ms
16,628 KB
testcase_26 AC 102 ms
16,704 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

*d=s=0
gets.to_i.times{eval'A,B='+gets.split*?,
s+=B
(10**5).downto(A){|i|d[i]=[d[i]||0,(d[i-A]||0)+B].max}}
i=-1
p d.map{|d|[i+=1,s-(d||0)].max}.min
0