<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>a_kawashiro</author_name>
  <author_url>https://blog.hatena.ne.jp/a_kawashiro/</author_url>
  <blog_title>a_kawashiroのブログ</blog_title>
  <blog_url>https://a-kawashiro.hatenablog.com/</blog_url>
  <categories>
    <anon>topcoder</anon>
  </categories>
  <description>DP[r][b]=max(r-b,赤を引く確率*DP[r+1][b]+黒を引く確率*DP[r][b+1])でDP。 そのままメモリに取るとMLEするので、r+1またはb+1しかない性質を利用してメモリを節約。 #include &lt;algorithm&gt; using namespace std; class RedIsGood { public: double getProfit(int R, int B) { double DP[2][5010]; for(int i=0;i&lt;=B+1;i++) DP[(R+1)%2][i]=0.0; for(int r=R;0&lt;=r;r--) { for(in…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fa-kawashiro.hatenablog.com%2Fentry%2F20110417%2F1303028791&quot; title=&quot;SRM420 div1 medium - a_kawashiroのブログ&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>2011-04-17 17:26:31</published>
  <title>SRM420 div1 medium</title>
  <type>rich</type>
  <url>https://a-kawashiro.hatenablog.com/entry/20110417/1303028791</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
