{"image_url":null,"version":"1.0","provider_name":"Hatena Blog","url":"https://mayokoex.hatenablog.com/entry/2016/02/11/201919","author_name":"mayokoex","title":"Educational Codeforces Round 3 E. Minimum spanning tree for each edge","type":"rich","height":"190","blog_url":"https://mayokoex.hatenablog.com/","categories":["CodeForces"],"published":"2016-02-11 20:19:19","width":"100%","description":"\u554f\u984c codeforces.com \u89e3\u6cd5 \u307e\u305a\u666e\u901a\u306b MST \u3092\u4f5c\u308a\u307e\u3059\u3002\u3067, \u305d\u306e\u6728\u306b\u8fba (u, v) \u3092\u8ffd\u52a0\u3057\u305f\u3068\u8003\u3048\u308b\u3068, \u9589\u8def\u304c\u51fa\u6765\u307e\u3059\u3002\u9589\u8def\u306e\u3044\u305a\u308c\u304b\u306e\u8fba\u3092\u53d6\u308a\u9664\u304f\u3068\u518d\u3073\u6728\u306b\u306a\u308b\u306e\u3067, \u9589\u8def\u306e\u4e2d\u304b\u3089\u30b3\u30b9\u30c8\u304c\u6700\u5927\u306e\u8fba\u3092\u53d6\u308a\u9664\u3051\u3070\u826f\u3044\u3067\u3059\u3002\u6700\u5927\u306e\u8fba\u306f\u3069\u3046\u3084\u3063\u3066\u53d6\u308a\u9664\u3051\u3070\u826f\u3044\u304b\u3068\u3044\u3046\u3068, \u30c0\u30d6\u30ea\u30f3\u30b0\u306e\u30c6\u30af\u30cb\u30c3\u30af\u3092\u4f7f\u3044\u307e\u3059\u3002maxCost[k][v] = (\u9802\u70b9 v \u304b\u3089 v \u3088\u308a 2^k \u500b\u3060\u3051\u4e0a\u306b\u3042\u308b\u9802\u70b9\u307e\u3067\u306e\u8fba\u306e\u6700\u5927\u30b3\u30b9\u30c8) \u3068\u3044\u3046\u306e\u3092\u4fdd\u5b58\u3057\u3066\u304a\u3051\u3070, lca \u3092\u6c42\u3081\u308b\u306e\u3068\u540c\u69d8\u306e\u624b\u6cd5\u3067\u9802\u70b9\u306e\u7d44 (u, v) \u306b\u304a\u3051\u308b, u -> lca -> v \u306e\u9593\u306e\u8fba\u306e\u6700\u5927\u30b3\u30b9\u30c8\u304c O(log N\u2026","provider_url":"https://hatena.blog","blog_title":"mayoko\u2019s diary","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmayokoex.hatenablog.com%2Fentry%2F2016%2F02%2F11%2F201919\" title=\"Educational Codeforces Round 3 E. Minimum spanning tree for each edge - mayoko\u2019s diary\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_url":"https://blog.hatena.ne.jp/mayokoex/"}