{"blog_url":"https://mayokoex.hatenablog.com/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmayokoex.hatenablog.com%2Fentry%2F2016%2F03%2F15%2F223011\" title=\" 8VC Venture Cup 2016 - Final Round C. Package Delivery - 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_name":"mayokoex","image_url":null,"url":"https://mayokoex.hatenablog.com/entry/2016/03/15/223011","blog_title":"mayoko\u2019s diary","provider_name":"Hatena Blog","author_url":"https://blog.hatena.ne.jp/mayokoex/","version":"1.0","provider_url":"https://hatena.blog","categories":["CodeForces"],"width":"100%","title":" 8VC Venture Cup 2016 - Final Round C. Package Delivery","published":"2016-03-15 22:30:11","height":"190","type":"rich","description":"\u3053\u308c\u306f\u3044\u308d\u3044\u308d\u96e3\u3057\u3044\u554f\u984c\u3067\u3057\u305f\u2026 \u826f\u3044\u554f\u984c\u3060\u3068\u601d\u3044\u307e\u3059\u3002 \u554f\u984c codeforces.com \u89e3\u6cd5 \u307e\u305a\u65b9\u91dd\u3067\u3059\u3002\u306a\u3093\u3068\u306a\u304f\u8caa\u6b32\u306a\u6c17\u304c\u3057\u307e\u3059\u304c, \u6c17\u3065\u304f\u306e\u304c\u96e3\u3057\u3044\u3067\u3059\u3002 next[i] = (x[i] \u304b\u3089 n \u4ee5\u5185\u3067\u9032\u3081\u308b\u5834\u6240\u306b\u3042\u3063\u3066, p[i] \u3088\u308a\u3082\u30b3\u30b9\u30c8\u304c\u5c0f\u3055\u3044, \u6700\u3082x[i] \u306b\u8fd1\u3044\u5ea7\u6a19) \u3092\u6c42\u3081\u307e\u3059\u3002next[i] \u306f\u5b58\u5728\u3057\u306a\u3044\u53ef\u80fd\u6027\u3082\u3042\u308a\u307e\u3059\u3002\u305d\u306e\u6642\u306f next[i] = -1 \u306b\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002\u3053\u306e\u6642, next[i] \u304c\u5b58\u5728\u3059\u308b\u5834\u5408 next[i] \u306b\u3044\u3051\u308b\u6700\u4f4e\u9650\u306e\u71c3\u6599\u3060\u3051\u88dc\u5145\u3057, next[i] \u306b\u5411\u304b\u3046 next[i] \u304c\u5b58\u5728\u3057\u306a\u3044\u5834\u5408 x[i] \u3067\u71c3\u6599\u3092\u6e80\u30bf\u30f3\u306b\u3057\u3066\u5148\u2026"}