{"version":"1.0","categories":["\u7af6\u6280\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0","AtCoder \u305d\u306e\u4ed6\u306e\u554f\u984c"],"provider_url":"https://hatena.blog","type":"rich","height":"190","blog_title":"\u304d\u308d\u304f","author_name":"babcs2035","published":"2019-01-07 16:43:21","provider_name":"Hatena Blog","url":"https://babcs2035.hateblo.jp/entry/2019/01/07/164321","width":"100%","author_url":"https://blog.hatena.ne.jp/babcs2035/","title":"Educational DP Contest\uff1aC - Vacation","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbabcs2035.hateblo.jp%2Fentry%2F2019%2F01%2F07%2F164321\" title=\"Educational DP Contest\uff1aC - Vacation - \u304d\u308d\u304f\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_url":"https://babcs2035.hateblo.jp/","description":"\u554f\u984c \u89e3\u6cd5 \u89e3\u7b54 \u554f\u984c atcoder.jp \u89e3\u6cd5 dp(i, j) := i - 1 \u65e5\u76ee\u306b j \u3092\u9078\u3093\u3060\u6642\u306e i \u65e5\u76ee\u307e\u3067\u306e\u5e78\u798f\u5ea6\u306e\u548c\u306e\u6700\u5927 \u3068\u5b9a\u7fa9\u3059\u308b\uff0e\u3053\u306e\u3068\u304d\uff0c dp(i, j) = max( dp(i - 1, 0) + a_(i - 1) (j != 0 \u306e\u3068\u304d), dp(i - 1, 1) + b_(i - 1) (j != 1 \u306e\u3068\u304d), dp(i - 1, 2) + c_(i - 1) (j != 2 \u306e\u3068\u304d)) \u3068\u6f38\u5316\u5f0f\u304c\u7acb\u3064\uff0e\u72b6\u614b\u6570 O(N)\uff0c\u9077\u79fb O(1) \u3068\u306a\u308a O(N)\uff0e \u89e3\u7b54 atcoder.jp","image_url":"https://cdn-ak.f.st-hatena.com/images/fotolife/b/babcs2035/20190107/20190107164307.png"}