<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Area1</author_name>
  <author_url>https://blog.hatena.ne.jp/Area1/</author_url>
  <blog_title>Area1のif(memo[i][j])</blog_title>
  <blog_url>https://area.hateblo.jp/</blog_url>
  <categories>
    <anon>SRM</anon>
    <anon>DP</anon>
    <anon>確率</anon>
  </categories>
  <description>問題 長さarrayLengthの配列がある。ここから無作為に2つの要素を取り出し、交換する動作をswapCount回行う。この後に当初a番目にあった要素がb番目に移動している確率を求めよ。 やりかた 典型的なDP。 dp[0][i]:=（i回スワップした後にbに移動している確率） dp[1][i]:=（i回スワップした後にb以外に移動している確率） でDP。 イカソース。 class RandomSwaps { public: double getProbability(int arrayLength, int swapCount, int a, int b){ memset(dp, 0, …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Farea.hateblo.jp%2Fentry%2F2014%2F11%2F29%2F000229&quot; title=&quot;SRM 338 Div1 Medium RandomSwaps - Area1のif(memo[i][j])&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>2014-11-29 00:02:29</published>
  <title>SRM 338 Div1 Medium RandomSwaps</title>
  <type>rich</type>
  <url>https://area.hateblo.jp/entry/2014/11/29/000229</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
