<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>moistx</author_name>
  <author_url>https://blog.hatena.ne.jp/moistx/</author_url>
  <blog_title>Logfiles</blog_title>
  <blog_url>https://logfiles.hatenablog.com/</blog_url>
  <categories>
    <anon>SRM</anon>
  </categories>
  <description>解法１ 先ず蟻本に掲載されている問題(Ants)と同じように、２つのボールの衝突は衝突していないですり抜けると同等であることに気づく。ボール二者のみについて着目すると、これらは「互いに離れていく」か「両方左に進む」か「両方右に進む」か「互いに近づく」かである。「互いに近づく」ときのみ衝突の場合の数が増える。あとはビット全探索をする。開始の向きを状態で持ち、それぞれの状態における衝突回数を全ての状態の数(2の要素数乗)で割れば期待値が求まる。 #include &lt;bits/stdc++.h&gt; using namespace std; class BouncingBalls { public: d…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Flogfiles.hatenablog.com%2Fentry%2F20140611%2F1402495127&quot; title=&quot;SRM458 Div2Med (Div1Easy) BouncingBalls - Logfiles&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-06-11 22:58:47</published>
  <title>SRM458 Div2Med (Div1Easy) BouncingBalls</title>
  <type>rich</type>
  <url>https://logfiles.hatenablog.com/entry/20140611/1402495127</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
