{"categories":[],"height":"190","blog_url":"https://pekempey.hatenablog.com/","version":"1.0","author_url":"https://blog.hatena.ne.jp/pekempey/","provider_url":"https://hatena.blog","image_url":"https://cdn-ak.f.st-hatena.com/images/fotolife/p/pekempey/20160825/20160825195141.png","url":"https://pekempey.hatenablog.com/entry/2016/08/25/200759","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpekempey.hatenablog.com%2Fentry%2F2016%2F08%2F25%2F200759\" title=\"CS Academy: Connected Tree Subgraphs - pekempey&#39;s blog\" 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":"pekempey's blog","title":"CS Academy: Connected Tree Subgraphs","author_name":"pekempey","width":"100%","description":"\u554f\u984c\u30da\u30fc\u30b8 modified 2018\u5e7412\u670821\u65e5 map \u3092\u4f7f\u3063\u305f\u3053\u308c\u306f\u3042\u3084\u307e\u308a\u3067\u3059\u306e\u3067\u3001\u30ad\u3092\u3064\u3051\u3066\u304f\u3060\u3055\u3044\u3002 modified 2018\u5e7412\u670817\u65e5 map \u3092\u4f7f\u3046\u3068\u66f8\u304d\u3084\u3059\u3044\u3089\u3057\u3044\u3002\u305f\u3068\u3048\u3070 height \u3092\u6c42\u3081\u308b\u306b\u306f\u6b21\u306e\u3088\u3046\u306b\u66f8\u3051\u3070\u3088\u3044\u3002 map<int, int> dp[100000]; vector<int> g[100000]; void dfs(int u, int p) { if (dp[u].count(p)) return; dp[u][p] = 0; for (int v : g[u]) if (v != p) { dfs(v, u); dp[u][p] = max\u2026","type":"rich","provider_name":"Hatena Blog","published":"2016-08-25 20:07:59"}