2019-03-12から1日間の記事一覧

AOJ(ALDS)その2

AIZU ONLINE JUDGE: Programming Challenge ALDS1_9_A Complete Binary Tree #完全二分木 $<.gets given = [nil] + $<.gets.split.map(&:to_i) a = nil given.drop(1).each_with_index do |key, i| j = i + 1 str = "node #{j}: key = #{key}, " str += "par…