<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>mmxsrup</author_name>
  <author_url>https://blog.hatena.ne.jp/mmxsrup/</author_url>
  <blog_title>srupのメモ帳</blog_title>
  <blog_url>https://mmxsrup.hatenablog.com/</blog_url>
  <categories>
    <anon>SRM</anon>
    <anon>dp</anon>
  </categories>
  <description>問題 問題概要 カッコの文字列が与えられる。カッコが対応する形に変更する。ただし変更できる文字の数は、((文字数)/2)+1まで。 解法 動的計画法で解いた。変更できる文字の数に制限があるので、最小の数で対応づけができるものを求めた。dp[i][j] := i番目までみて、'('がj個多い時の変更した最小回数 として、ループで値を埋めていった。注意することは漸化式を立てるときに、j=0の時だけ場合分けしなければならない。j=0の時に、次に、')'を置くと、j=-1となり、カッコが対応しなくなるから。 これで最小値は求まるが、どこの位置を変更したかも求めなければならない。そのため経路復元用に、b…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmmxsrup.hatenablog.com%2Fentry%2F2016%2F10%2F11%2F231811&quot; title=&quot;SRM 688 div2 easy ParenthesesDiv2Medium - srupのメモ帳&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2016-10-11 23:18:11</published>
  <title>SRM 688 div2 easy ParenthesesDiv2Medium</title>
  <type>rich</type>
  <url>https://mmxsrup.hatenablog.com/entry/2016/10/11/231811</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
