<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>parukii</author_name>
  <author_url>https://blog.hatena.ne.jp/parukii/</author_url>
  <blog_title>parukiのブログ</blog_title>
  <blog_url>https://par.hateblo.jp/</blog_url>
  <categories>
    <anon>RMQ</anon>
    <anon>セグメント木</anon>
    <anon>DP</anon>
  </categories>
  <description>蛍光灯が途切れずに照らしている範囲を左端から右端へ伸ばしていこう。 最適解では、手前で使った蛍光灯をi、次の蛍光灯をjとすると、l[i]&lt;l[j] が成り立つ。なので、事前に蛍光灯をlの昇順にソートしておく。 dp[x] = 0からxまでが途切れずに照らされているときの最小コスト とする。dp[L]が解。 はじめ dp[0] = 0である。 蛍光灯をソートされた順にみよう。いま、i番目の蛍光灯の使用を考る。dp[r[i]]が更新されるかもしれない。 蛍光灯は[l[i], r[i]] の範囲を照らすので、 前の範囲 =&gt; (重複) =&gt; [l[i], r[i]] のようになっていれば、左端からr…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpar.hateblo.jp%2Fentry%2F2017%2F09%2F12%2F132326&quot; title=&quot;C: 蛍光灯 | AtCoder Regular Contest 026 - parukiのブログ&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>2017-09-12 13:23:26</published>
  <title>C: 蛍光灯 | AtCoder Regular Contest 026</title>
  <type>rich</type>
  <url>https://par.hateblo.jp/entry/2017/09/12/132326</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
