{"author_name":"mayokoex","url":"https://mayokoex.hatenablog.com/entry/2016/08/29/111501","height":"190","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmayokoex.hatenablog.com%2Fentry%2F2016%2F08%2F29%2F111501\" title=\"AtCoder Regular Contest 060 E - \u9ad8\u6a4b\u541b\u3068\u30db\u30c6\u30eb / Tak and Hotels - 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>","title":"AtCoder Regular Contest 060 E - \u9ad8\u6a4b\u541b\u3068\u30db\u30c6\u30eb / Tak and Hotels","provider_name":"Hatena Blog","blog_title":"mayoko\u2019s diary","width":"100%","version":"1.0","type":"rich","categories":["AtCoder"],"blog_url":"https://mayokoex.hatenablog.com/","published":"2016-08-29 11:15:01","description":"\u306a\u3093\u3060\u304b\u3093\u3060 3 \u5b8c\u3067\u304d\u3066\u3046\u308c\u3074\u30fc\u3002 \u554f\u984c arc060.contest.atcoder.jp \u89e3\u6cd5 \u30af\u30a8\u30ea\u3067\u306f a \u6226\u7565\u3068\u3057\u3066\u306f, \u300c\u305d\u306e\u65e5\u306b\u305f\u3069\u308a\u7740\u3051\u308b\u3068\u3053\u308d\u307e\u3067\u306a\u308b\u3079\u304f\u9060\u304f\u3078\u884c\u304f\u300d\u3068\u3044\u3046\u306e\u304c\u660e\u3089\u304b\u306b\u6700\u9069\u3067\u3059\u3002\u3068\u3044\u3046\u3053\u3068\u3067, nxt[0][i] = (\u9802\u70b9 i \u304b\u3089\u306a\u308b\u3079\u304f\u9060\u304f\u3078\u884c\u3053\u3046\u3068\u3057\u305f\u3068\u304d\u305f\u3069\u308a\u7740\u304f\u9802\u70b9) \u3068\u3044\u3046\u306e\u3092\u3042\u3089\u304b\u3058\u3081\u30e1\u30e2\u3057\u3066\u304a\u304d\u307e\u3059\u3002\u3053\u308c\u306f\u4e8c\u5206\u63a2\u7d22\u3092\u4f7f\u3048\u3070\u5404 i \u306b\u3064\u3044\u3066 O(log N) \u3067\u3067\u304d\u307e\u3059\u3002\u3067, nxt[j+1][i] = nxt[j][nxt[j][i]] \u3068\u3044\u3046\u306e\u3092\u7e70\u308a\u8fd4\u3059\u3053\u3068\u306b\u3088\u308a, i \u304b\u3089 2^j \u65e5\u8caa\u6b32\u306b\u79fb\u52d5\u3057\u305f\u969b\u306b\u305f\u3069\u308a\u7740\u3051\u308b\u6700\u3082\u9060\u3044\u9802\u70b9\u3092\u5f97\u307e\u3059\u3002\u2026","provider_url":"https://hatena.blog","image_url":null,"author_url":"https://blog.hatena.ne.jp/mayokoex/"}