<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>inamori</author_name>
  <author_url>https://blog.hatena.ne.jp/inamori/</author_url>
  <blog_title>inamori’s diary</blog_title>
  <blog_url>https://inamori.hateblo.jp/</blog_url>
  <categories>
  </categories>
  <description>https://atcoder.jp/contests/abc360/tasks/abc360_e例えばN=3で考えると、1から2に移動する確率は2/9で、1から1に移動する確率は1-2/9*2=5/9です。一般には、ある位置から他に移動する確率は、で、同じところにとどまる確率はとなります。なので、1回での状態遷移行列は、 と書けます。ここで、Aは全ての要素が1の行列、Iは単位行列、、です。K回の状態遷移確率はです。また、Tが与えられたときの期待値Eは、となります。 ですが、だから、を考慮すると、 ここで、aN+b=1だから、 また、、だから、結局、 となります。 // Random Swap…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Finamori.hateblo.jp%2Fentry%2F2024%2F07%2F02%2F214403&quot; title=&quot;AtCoder Beginner Contest 360 E - inamori’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>2024-07-02 21:44:03</published>
  <title>AtCoder Beginner Contest 360 E</title>
  <type>rich</type>
  <url>https://inamori.hateblo.jp/entry/2024/07/02/214403</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
