<?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>AOJ</anon>
  </categories>
  <description>解法 直前与えた肥料が何であるかが、今回に何を与えるのが最適であるかを決める。 よって、状態として「肥料を与えた回数」と「直前に与えた肥料」を持ち、成長率を最大化するDPをすればよい。 具体的には、k 日目に肥料 j を与えたときの成長率は、k-1 日目に肥料 i を与えていたとして、その上で 肥料 j を与えたという情報で更新出来る。よって３重ループで解ける。 #include &lt;iostream&gt; #include &lt;algorithm&gt; #include &lt;vector&gt; using namespace std; int main() { int N, M; while(cin &gt;&gt; N…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Flogfiles.hatenablog.com%2Fentry%2F20140410%2F1397112596&quot; title=&quot;AOJ0191 Baby Tree - 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-04-10 15:49:56</published>
  <title>AOJ0191 Baby Tree</title>
  <type>rich</type>
  <url>https://logfiles.hatenablog.com/entry/20140410/1397112596</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
