{"version":"1.0","categories":["\u30e9\u30a4\u30d6\u30e9\u30ea"],"type":"rich","author_name":"peroon","title":"\uff08\u30b3\u30b9\u30c8\u4ed8\u304d\uff09\u6728\u306e\u76f4\u5f84(by dfs) \u5fa9\u5143\u4ed8\u304d","author_url":"https://blog.hatena.ne.jp/peroon/","blog_title":"perogram","blog_url":"https://perogram.hateblo.jp/","published":"2020-10-06 21:43:36","provider_name":"Hatena Blog","height":"190","description":"yosupo judge\u3067AC https://judge.yosupo.jp/submission/25877 \u76f4\u5f84\u306e\u30d1\u30b9\u3082\u6c42\u3081\u3089\u308c\u308b // \u6728\u306e\u76f4\u5f84\uff08\u30b3\u30b9\u30c8\u3042\u308a\uff09 struct TreeDiameter{ vector<vector<PII>> G; // (to, cost) ll N; ll start,end; VI path; ll d; VI TO; // \u521d\u671f\u5316\u306e\u307f TreeDiameter(ll n){ N=n; G.resize(N); TO.resize(N, -1); } // \u8fba\u767b\u9332 (\u4e21\u65b9\u5411!!) void add_edge(ll a, ll b, ll cost)\u2026","provider_url":"https://hatena.blog","url":"https://perogram.hateblo.jp/entry/2020/10/06/214336","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fperogram.hateblo.jp%2Fentry%2F2020%2F10%2F06%2F214336\" title=\"\uff08\u30b3\u30b9\u30c8\u4ed8\u304d\uff09\u6728\u306e\u76f4\u5f84(by dfs) \u5fa9\u5143\u4ed8\u304d - perogram\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","image_url":null,"width":"100%"}