<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>sune2</author_name>
  <author_url>https://blog.hatena.ne.jp/sune2/</author_url>
  <blog_title>競技プログラミング+αなブログ</blog_title>
  <blog_url>https://sune2.hatenadiary.org/</blog_url>
  <categories>
    <anon>AOJ</anon>
  </categories>
  <description>問題 ２枚ずつのM種類のカードN(=2M)枚で１人神経衰弱をする。 今までに開けたカード全てを記憶出来るとき、ミスマッチする回数の期待値を求めよ。 制約 2 解法 カードを１列に並べたものをイメージして、左から順に開けていく。 今開けようとしているカードの位置、１回開けたがまだマッチしていないカードの枚数を引数としてメモ化再帰。 ソース double memo[1000][1000]; int n; double solve(int now, int rest) { // rest : 開けたけど残っているもの if (now &gt;= n) return 0; if (memo[now][res…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsune2.hatenadiary.org%2Fentry%2F20120418%2F1334759438&quot; title=&quot;2139 - Memory Match - 競技プログラミング+αなブログ&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>2012-04-18 23:30:38</published>
  <title>2139 - Memory Match</title>
  <type>rich</type>
  <url>https://sune2.hatenadiary.org/entry/20120418/1334759438</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
