結果

問題 No.710 チーム戦
ユーザー %20%20
提出日時 2018-12-09 21:19:56
言語 Ruby
(3.3.0)
結果
AC  
実行時間 1,298 ms / 3,000 ms
コード長 150 bytes
コンパイル時間 269 ms
コンパイル使用メモリ 11,140 KB
実行使用メモリ 16,896 KB
最終ジャッジ日時 2023-10-14 21:53:44
合計ジャッジ時間 32,022 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
16,596 KB
testcase_01 AC 147 ms
16,728 KB
testcase_02 AC 1,250 ms
16,852 KB
testcase_03 AC 1,283 ms
16,752 KB
testcase_04 AC 1,272 ms
16,724 KB
testcase_05 AC 1,270 ms
16,676 KB
testcase_06 AC 1,298 ms
16,780 KB
testcase_07 AC 1,264 ms
16,588 KB
testcase_08 AC 1,264 ms
16,724 KB
testcase_09 AC 1,278 ms
16,764 KB
testcase_10 AC 1,264 ms
16,852 KB
testcase_11 AC 1,265 ms
16,760 KB
testcase_12 AC 1,275 ms
16,772 KB
testcase_13 AC 1,262 ms
16,852 KB
testcase_14 AC 1,269 ms
16,724 KB
testcase_15 AC 1,263 ms
16,872 KB
testcase_16 AC 1,268 ms
16,684 KB
testcase_17 AC 1,265 ms
16,676 KB
testcase_18 AC 1,263 ms
16,772 KB
testcase_19 AC 1,277 ms
16,852 KB
testcase_20 AC 1,263 ms
16,816 KB
testcase_21 AC 1,271 ms
16,716 KB
testcase_22 AC 1,256 ms
16,888 KB
testcase_23 AC 1,275 ms
16,716 KB
testcase_24 AC 1,255 ms
16,884 KB
testcase_25 AC 100 ms
16,896 KB
testcase_26 AC 99 ms
16,724 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

*d=s=0
gets.to_i.times{a,b=gets.split.map &:to_i
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