<?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/abc222/tasks/abc222_e最短経路が辺を通る回数をとすると、母関数を考えて、 このの係数を求めればよいです。と置いて、 として、と置けば、 なので、を計算しての係数を求めればよいです。同じの重複度をと書くと、 これを最初分割統治法的に求めたら、すごく遅いんですね。ランダムな経路で計算したら14秒でした。各多項式が「疎な」多項式なので順に積を求める方が速いんですね。そのようにしたら1.1秒になりました。 さらに、あとに掛けるほうが項数が少ない方が速くなるはずなので、でソートして掛けると、0.8秒になりました。以下は、PyPy…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Finamori.hateblo.jp%2Fentry%2F2021%2F10%2F22%2F114503&quot; title=&quot;AtCoder Beginner Contest 222 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>2021-10-22 11:45:03</published>
  <title>AtCoder Beginner Contest 222 E</title>
  <type>rich</type>
  <url>https://inamori.hateblo.jp/entry/2021/10/22/114503</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
