{"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fjeneshicc.hatenadiary.org%2Fentry%2F20090926%2F1253995088\" title=\"Google Code Jam 2009 Round2 C \uff08\u30e1\u30e2\uff09 - \u843d\u66f8\u304d\u3001\u6642\u3005\u843d\u5b66\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_title":"\u843d\u66f8\u304d\u3001\u6642\u3005\u843d\u5b66","provider_url":"https://hatena.blog","width":"100%","author_url":"https://blog.hatena.ne.jp/jeneshicc/","version":"1.0","provider_name":"Hatena Blog","categories":["Memo","Haskell"],"title":"Google Code Jam 2009 Round2 C \uff08\u30e1\u30e2\uff09","published":"2009-09-26 04:58:08","type":"rich","description":"\u30de\u30c3\u30c1\u30f3\u30b0\u3067\u89e3\u3051\u308b\u306e\u306d\uff0e \u305d\u3093\u306a\u306e\u601d\u3044\u3064\u304d\u307e\u305b\u3093\uff0e\u89e3\u3051\u306a\u3044\u307e\u307e\uff0c\u7d42\u308b\u306e\u306f\u30b7\u30e3\u30af\u306a\u306e\u3067\uff0cHaskell\u3067\u66f8\u3044\u3066\u307f\u305f\uff0e import Control.Monad import Text.Printf import Data.Array import Data.Graph.Inductive -- main part main = do (t:_) <- getList :: IO [Int] forM_ [1..t] $ \\i -> do (n:_) <- getList cs <- replicateM n getList :: IO [[Int]] printf \"Case #%d: %d\\n\u2026","blog_url":"https://jeneshicc.hatenadiary.org/","height":"190","url":"https://jeneshicc.hatenadiary.org/entry/20090926/1253995088","author_name":"jeneshicc","image_url":null}