結果

問題 No.54 Happy Hallowe'en
ユーザー gigurururugigurururu
提出日時 2014-11-06 23:08:00
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 127 bytes
コンパイル時間 173 ms
コンパイル使用メモリ 11,476 KB
実行使用メモリ 15,352 KB
最終ジャッジ日時 2023-08-30 01:42:24
合計ジャッジ時間 7,320 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
15,352 KB
testcase_01 AC 82 ms
15,196 KB
testcase_02 AC 82 ms
15,324 KB
testcase_03 AC 82 ms
15,064 KB
testcase_04 TLE -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

m=[0]
(1..gets.to_i).map{gets.split.map &:to_i}.sort_by{|i,j|[j,-i]}.each{|i,j|
  m+=m.select{|k|k<j}.map{|k|k+i}
}
p m.max
0