<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>qnighy</author_name>
  <author_url>https://blog.hatena.ne.jp/qnighy/</author_url>
  <blog_title>簡潔なQ</blog_title>
  <blog_url>https://qnighy.hatenablog.com/</blog_url>
  <categories>
    <anon>Programming</anon>
    <anon>Algorithm</anon>
  </categories>
  <description>去年優勝しましたZATORIKUは今年もSuperCon楽しませてもらいます。二連覇しますよ。期末なのでこれ書いたら寝ます。 解法概要 mが奇数のとき0 そうでない場合、[ [0,1],[1,1] ]^nと[ [1,2],[1,3] ]^(m/2)のしかるべき位置の積 行列累乗はバイナリ法を利用 O(l(log n+log m)) ただしl=600,000 最適化 2x2の行列の累乗は2変数で表現できる、など、変数の削減→nについては内部ループ1回につき3回、mについては内部ループ1回につき4回の剰余演算(分岐なし)で可能 変数削減したうえで、使う変数だけをまとめてブロックにすると、最適化がう…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fqnighy.hatenablog.com%2Fentry%2F20100630%2F1277907760&quot; title=&quot;SuperCon2010予選通過報告とソース - 簡潔なQ&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>2010-06-30 23:22:40</published>
  <title>SuperCon2010予選通過報告とソース</title>
  <type>rich</type>
  <url>https://qnighy.hatenablog.com/entry/20100630/1277907760</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
