{"blog_title":"takapt0226's diary","type":"rich","height":"190","image_url":null,"provider_url":"https://hatena.blog","url":"https://takapt0226.hatenablog.com/entry/2013/01/16/035945","author_url":"https://blog.hatena.ne.jp/takapt0226/","version":"1.0","description":"\u89e3\u6cd5 \u533a\u9593dp dp[i][j] = [i, j]\u306e\u6700\u5927\u30de\u30c3\u30c1\u30f3\u30b0 \u30bd\u30fc\u30b9\u30b3\u30fc\u30c9 int n; string c; int dp[55][55]; int dfs(int l, int r) { if (l >= r) return 0; else if (dp[l][r] != -1) return dp[l][r]; int res = 0; for (int i = l + 1; i <= r; ++i) if (c[l] == c[i]) chmax(res, 1 + dfs(l + 1, i - 1) + dfs(i + 1, r)); chmax(res, dfs(l + 1, r\u2026","provider_name":"Hatena Blog","blog_url":"https://takapt0226.hatenablog.com/","published":"2013-01-16 03:59:45","title":"SRM 566 Div2 Medium PenguinPals","width":"100%","categories":[],"author_name":"takapt0226","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakapt0226.hatenablog.com%2Fentry%2F2013%2F01%2F16%2F035945\" title=\"SRM 566 Div2 Medium PenguinPals - takapt0226&#39;s diary\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>"}