<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>mayokoex</author_name>
  <author_url>https://blog.hatena.ne.jp/mayokoex/</author_url>
  <blog_title>mayoko’s diary</blog_title>
  <blog_url>https://mayokoex.hatenablog.com/</blog_url>
  <categories>
    <anon>yukicoder</anon>
  </categories>
  <description>351 が☆2 で 352 が☆3 なのか…(こっちのほうが考えやすかった) 問題 No.352 カード並べ - yukicoder 解法 順番にカードを入れていき, そのたびかかるコストの期待値を求めていきます。 カードが M 枚場に並んでいる場合, 端っこに置く確率は 2/(M+1) で 端以外に置く確率は (M-1)/(M+1) 両端に並んでいるカードは, M*(M-1)/2 通りありますが, それぞれは等確率で選ばれます。例えば, M=3 の場合, 1-2, 1-3, 2-3 というのがそれぞれ等確率で現れると考えて良いので, これらを全列挙して期待値を求めます。 以上を考慮すれば答え…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmayokoex.hatenablog.com%2Fentry%2F2016%2F03%2F12%2F003000&quot; title=&quot;yukicoder No.352 カード並べ - mayoko’s diary&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-03-12 00:30:00</published>
  <title>yukicoder No.352 カード並べ</title>
  <type>rich</type>
  <url>https://mayokoex.hatenablog.com/entry/2016/03/12/003000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
