<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>d_tutuz</author_name>
  <author_url>https://blog.hatena.ne.jp/d_tutuz/</author_url>
  <blog_title>数学/競プロメモ</blog_title>
  <blog_url>https://tutuz.hateblo.jp/</blog_url>
  <categories>
  </categories>
  <description>問題 https://atcoder.jp/contests/arc097/tasks/arc097_c 考え方 状態を決め打ちできるかどうかが一番重要な考察な気がする。つまり dp[i][j] := 左から [1,i] までの黒 'B' の数と [1,j] までの白 'W' の数が正しく並べるようにするときの最小のswap回数 と定義すると、その次に置くべき数は一意に決まるのでDPで解を求めることができる。dp[i][j] としたときに 'B' を次に置くのであればその数は i+1 であるし、'W' であれば j+1 である。 よってDPの形は以下のようになる。 dp[i+1][j] = m…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftutuz.hateblo.jp%2Fentry%2F2019%2F02%2F11%2F101327&quot; title=&quot;AtCoder Regular Contest 097：E - Sorted and Sorted - 数学/競プロメモ&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>2019-02-11 10:13:27</published>
  <title>AtCoder Regular Contest 097：E - Sorted and Sorted</title>
  <type>rich</type>
  <url>https://tutuz.hateblo.jp/entry/2019/02/11/101327</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
