{"categories":["AOJ","Ruby"],"description":"0200 Traveling Alone: One-way Ticket of Youth until (given = gets.split.map(&:to_i)) == [0, 0] n, m = given edge = Array.new(m) {[]} h = Array.new(m) {[]} n.times do a, b, cost, time = gets.split.map(&:to_i) a -= 1 b -= 1 edge[a][b] = edge[b][a] = [cost, time] h[a] << b h[b] << a end gets.to_i.times\u2026","url":"https://marginalia.hatenablog.com/entry/2019/07/31/013710","width":"100%","title":"AOJ\uff08\u554f\u984c\u96c6\uff0921","provider_url":"https://hatena.blog","blog_title":"Marginalia","author_url":"https://blog.hatena.ne.jp/obelisk2/","blog_url":"https://marginalia.hatenablog.com/","image_url":null,"provider_name":"Hatena Blog","author_name":"obelisk2","height":"190","version":"1.0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmarginalia.hatenablog.com%2Fentry%2F2019%2F07%2F31%2F013710\" title=\"AOJ\uff08\u554f\u984c\u96c6\uff0921 - Marginalia\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","published":"2019-07-31 01:37:10","type":"rich"}