{"version":"1.0","image_url":"https://cdn-ak.f.st-hatena.com/images/fotolife/d/d_tutuz/20190209/20190209172225.png","width":"100%","author_name":"d_tutuz","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftutuz.hateblo.jp%2Fentry%2F2019%2F02%2F09%2F173018\" title=\"AtCoder Regular Contest 081\uff1aE - Don&#39;t Be a Subsequence - \u6570\u5b66/\u7af6\u30d7\u30ed\u30e1\u30e2\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","published":"2019-02-09 17:30:18","type":"rich","blog_url":"https://tutuz.hateblo.jp/","categories":[],"url":"https://tutuz.hateblo.jp/entry/2019/02/09/173018","author_url":"https://blog.hatena.ne.jp/d_tutuz/","provider_url":"https://hatena.blog","blog_title":"\u6570\u5b66/\u7af6\u30d7\u30ed\u30e1\u30e2","height":"190","provider_name":"Hatena Blog","title":"AtCoder Regular Contest 081\uff1aE - Don't Be a Subsequence","description":"\u554f\u984c https://atcoder.jp/contests/arc081/tasks/arc081_c \u8003\u3048\u65b9 \u57fa\u672c\u7684\u306a\u8003\u3048\u65b9\u306f\u653e\u9001\u89e3\u8aac\u304c\u308f\u304b\u308a\u3084\u3059\u3044\u3002 dp[i] := \u4f4d\u7f6e i \u4ee5\u964d\u3067\u6761\u4ef6\u3092\u6e80\u305f\u3059\u6700\u5c0f\u306e\u6587\u5b57\u5217\u306e\u9577\u3055 \u3068\u3059\u308b\u3002\u305d\u306e\u3068\u304d dp[i] = min(dp[next[i][j]] + 1) \u3068\u306a\u308b\u3002next[i][j] \u306f \u4f4d\u7f6e i \u4ee5\u964d\u3067\u6587\u5b57 c \u304c\u73fe\u308c\u308b\u4e00\u756a\u6700\u521d\u306e\u4f4d\u7f6e\u306e index \u3067\u3042\u308b\u3002 \u6587\u5b57\u5217\u306e\u9577\u3055\u304c\u6c42\u307e\u3063\u305f\u3089\u3001\u5177\u4f53\u7684\u306b dp[0] \u306e\u9577\u3055\u306e\u6587\u5b57\u5217\u3092\u69cb\u6210\u3059\u308b\u3053\u3068\u306b\u306a\u308b\u3002\u3053\u308c\u306f\u3001dp[i] \u306e\u9577\u3055\u3092\u6c42\u3081\u308b\u904e\u7a0b\u3067\u6700\u5c0f\u306e\u9577\u3055\u306b\u306a\u3063\u305f\u3068\u304d\u306e\u6587\u5b57 c \u306e\u60c5\u5831\u3092\u4fdd\u6301\u3057\u3066\u304a\u304f\u3053\u3068\u3067\u4f55\u306b\u2026"}