<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>mayokoex</author_name>
  <author_url>https://blog.hatena.ne.jp/mayokoex/</author_url>
  <blog_title>mayoko’s diary</blog_title>
  <blog_url>https://mayokoex.hatenablog.com/</blog_url>
  <categories>
    <anon>CodeForces</anon>
  </categories>
  <description>問題 codeforces.com 解法 直前の 2 要素が 0 の時, またその時のみ数列のすべての値が 0 になります。それ以外の場合は, 普通のフィボナッチ数列と同じように, 指数オーダーで発散します。調べてみると, 大体 100 個程度あれば絶対値が 10^9 を超えてきそうなので, (a[i] == 0 ^ a[j] == 0) を満たさないすべての (i, j) について, それらを初項にする数列を調べていけば良いです。本番ではそれを調べるのに, unordered_map を使っていたんですが, unordered_map は find に最悪 O(n) かかるらしいので TLE…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmayokoex.hatenablog.com%2Fentry%2F2016%2F02%2F27%2F203605&quot; title=&quot;Manthan, Codefest 16 D. Fibonacci-ish - mayoko’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>2016-02-27 20:36:05</published>
  <title>Manthan, Codefest 16 D. Fibonacci-ish</title>
  <type>rich</type>
  <url>https://mayokoex.hatenablog.com/entry/2016/02/27/203605</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
