{"width":"100%","published":"2021-12-03 11:37:18","version":"1.0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakeg.hatenadiary.jp%2Fentry%2F2021%2F12%2F03%2F113718\" title=\"073 - We Need Both a and b\uff08\u26055\uff09\u89e3\u3044\u305f - \u30d9\u30b9\u30d1\u30ea\u30d6\" 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":"https://cdn-ak.f.st-hatena.com/images/fotolife/t/takeg/20211203/20211203110534.png","provider_url":"https://hatena.blog","blog_title":"\u30d9\u30b9\u30d1\u30ea\u30d6","categories":["AtCoder","\u6728DP","\u7af6\u6280\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0"],"blog_url":"https://takeg.hatenadiary.jp/","url":"https://takeg.hatenadiary.jp/entry/2021/12/03/113718","author_name":"takeg","title":"073 - We Need Both a and b\uff08\u26055\uff09\u89e3\u3044\u305f","author_url":"https://blog.hatena.ne.jp/takeg/","type":"rich","height":"190","description":"\u554f\u984c\uff1a\u7af6\u30d7\u30ed\u5178\u578b 90 \u554f 073 - We Need Both a and b\uff08\u26055\uff09 \u89e3\u8aac \u4ee5\u4e0b\u306e\u6728DP\u3092\u69cb\u7bc9\u3057\u3066\u89e3\u304d\u305f\u3044\u3002 dp[u][j] := \uff08\u9802\u70b9u\u3092\u6839\u3068\u3059\u308b\u90e8\u5206\u6728\u306b\u304a\u3044\u3066\u3001\uff09\u9802\u70b9u\u3092\u542b\u3080\u9023\u7d50\u6210\u5206\u306e\u72b6\u614b\u304cj\u306e\u3068\u304d\u306e\u5834\u5408\u306e\u6570\u3002\u305f\u3060\u3057j=0\u306f'a'\u3057\u304b\u306a\u3044\u72b6\u614b\u3001j=1\u306f'b'\u3057\u304b\u306a\u3044\u72b6\u614b\u3001j=2\u306f'ab'\u4e21\u65b9\u3042\u308b\u72b6\u614b \u8a73\u3057\u3044\u89e3\u8aac\u306f\u516c\u5f0f\u89e3\u8aac\u3084\u3053\u3061\u3089\u306e\u8a18\u4e8b\u306b\u4efb\u305b\u308b\u3068\u3057\u3066\u3001dp\u306e\u66f4\u65b0\u5f0f\u306e\u52d8\u6240\u306e\u307f\u3092\u89e3\u8aac\u3057\u305f\u3044\u3002 dp[u][0]\u306e\u66f4\u65b0\u5f0f\u306e\u8003\u3048\u65b9 \u9802\u70b9u\u304c'a'\u306e\u5834\u5408\u3001 (1)\u5b50\u306e\u9023\u7d50\u6210\u5206\u304c'a'\u306e\u72b6\u614b\u304b\u3064\u3001\u9023\u7d50\u3057\u3066\u3044\u308b (2)\u5b50\u306e\u9023\u7d50\u6210\u5206\u304c'ab'\u306e\u72b6\u614b\u304b\u3064\u3001\u9023\u7d50\u3057\u3066\u3044\u306a\u3044 \u300c(1)\u5b50\u306e\u9023\u7d50\u2026","provider_name":"Hatena Blog"}