2019-02-20から1日間の記事一覧

AOJ(問題集)18

AIZU ONLINE JUDGE: Programming Challenge 0170 Lunch until (n = $<.gets.to_i).zero? data = n.times.map {$<.gets.split}.map {|a, *b| [a] + b.map(&:to_i)} selected = [] all = [*0...n] solve = ->(left, order) { return if data[order.last][2] < …