<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>simezi_tan</author_name>
  <author_url>https://blog.hatena.ne.jp/simezi_tan/</author_url>
  <blog_title>simezi_tanの日記</blog_title>
  <blog_url>https://simezi-tan.hatenadiary.org/</blog_url>
  <categories>
    <anon>TopCoder</anon>
    <anon>動的計画法</anon>
  </categories>
  <description>問題 ある数列がk-monotonicであるとは、数列を連続するk個の区間に分けて、 それぞれの区間が全て単調数列（真に単調増加または単調減少）にできることを言う。 与えられた数列a[i]とkに対して、a[i]の要素を一つ選び、 その要素を+1または-1する操作を何回か繰り返して、 a[i]をk-monotonicにしたい。 このような操作は最小で何回必要か、求めよ。 制約条件 n≦50 k≦n -20,000,000≦a[i]≦20,000,000</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsimezi-tan.hatenadiary.org%2Fentry%2F20120613%2F1339542749&quot; title=&quot;TopCoder SRM 309 Div1 Medium KMonotonic - simezi_tanの日記&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>2012-06-13 08:12:29</published>
  <title>TopCoder SRM 309 Div1 Medium KMonotonic</title>
  <type>rich</type>
  <url>https://simezi-tan.hatenadiary.org/entry/20120613/1339542749</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
