{"published":"2019-03-18 00:07:51","author_name":"koba-e964","type":"rich","height":"190","provider_name":"Hatena Blog","width":"100%","blog_url":"https://koba-e964.hatenablog.com/","title":"yukicoder No.802 \u3060\u3044\u305f\u3044\u7b49\u5dee\u6570\u5217","version":"1.0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkoba-e964.hatenablog.com%2Fentry%2F2019%2F03%2F18%2F000751\" title=\"yukicoder No.802 \u3060\u3044\u305f\u3044\u7b49\u5dee\u6570\u5217 - koba-e964\u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","categories":[],"provider_url":"https://hatena.blog","url":"https://koba-e964.hatenablog.com/entry/2019/03/18/000751","image_url":null,"description":"\u3053\u3046\u3044\u3046\u306e\u306f\u304b\u306a\u308a\u5f97\u610f\u3060\u3068\u601d\u3063\u3066\u3044\u308b\u3002 No.802 \u3060\u3044\u305f\u3044\u7b49\u5dee\u6570\u5217 - yukicoder \u554f\u984c \u4ee5\u4e0b\u306e\u6761\u4ef6\u3092\u6e80\u305f\u3059\u9577\u3055N\u306e\u6574\u6570\u5217A\u306e\u500b\u6570\u3092\u6570\u3048\u300110^9+7\u3067\u5272\u3063\u305f\u4f59\u308a\u3092\u6c42\u3081\u3088\u3002 1 i = 1, ..., N - 1\u306b\u5bfe\u3057\u3066 D1 \u5236\u7d04 2 1 0 \u89e3\u6cd5 \u307e\u305a\u611a\u76f4DP\u3092\u8003\u3048\u308b\u3002DP[i][j] := (A\u306e\u7b2ci\u9805\u307e\u3067\u898b\u305f\u3068\u304d\u3001A[i]=j\u3068\u306a\u308b\u3088\u3046\u306a\u6570\u5217\u306e\u500b\u6570)\u3068\u3057\u305f\u3068\u304d\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u9077\u79fb\u3092\u6301\u3064DP\u3092\u884c\u3048\u3070\u3088\u3044\u3002 init: DP[1][j] = 1 step: DP[i + 1][j + k] += DP[i][j] (D1 \u3053\u308c\u306eDP[N][1] + ... DP[N][M]\u304c\u7b54\u3048\u2026","blog_title":"koba-e964\u306e\u65e5\u8a18","author_url":"https://blog.hatena.ne.jp/koba-e964/"}