<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>inarizuuuushi</author_name>
  <author_url>https://blog.hatena.ne.jp/inarizuuuushi/</author_url>
  <blog_title>Sabrou-mal サブロウ丸</blog_title>
  <blog_url>https://inarizuuuushi.hatenablog.com/</blog_url>
  <categories>
    <anon>アルゴリズム周辺</anon>
    <anon>数学</anon>
  </categories>
  <description>ダブリングという計算手法に感動したので、No.572 妖精の演奏 - yukicoderこの問題の解説を書こうと思います。 問題文を読むと、なるほどいかにも動的計画法チックな問題ですね、 ということで、最初は普通に以下のような定式化を行いました。 gist.github.com これで正しい答えが求まるのですが、TLE(実行時間切れ)になりました。今回 M ≦ 30, N ≤ 5*109, で最悪ケースで N &gt;&gt; Mなので O(NM2)のNが計算時間に特に効いてきます。なのでこのNをどうにかして小さくしたいという思いがでてきます。 そこでダブリングという手法を用います。 この手法を用いると以…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Finarizuuuushi.hatenablog.com%2Fentry%2F2017%2F10%2F21%2F081802&quot; title=&quot;ダブリング - Sabrou-mal サブロウ丸&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>https://cdn-ak.f.st-hatena.com/images/fotolife/i/inarizuuuushi/20171009/20171009110601.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2017-10-21 08:18:02</published>
  <title>ダブリング</title>
  <type>rich</type>
  <url>https://inarizuuuushi.hatenablog.com/entry/2017/10/21/081802</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
