<?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 解法 dp[k][i] = (数列 a をつなげた個数が k 個で, 末尾の添字が i となるような場合の数) とします。これがわかれば, 数列が k 個つないでいるようなものが大体 p = L/N - k 個あるのでそれを数えて dp[k][i] * p の和を取っていけば良いです。ということで, dp[k][i] を求めます。 dp[k][i] は, a[j] k-1][j] の和になるので, これの値を cnt[] として求めます。これは, a[i] の lower_bound を計算しておけば(この lower_bound の値を a[i] として保…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmayokoex.hatenablog.com%2Fentry%2F2015%2F10%2F17%2F133035&quot; title=&quot;Codeforces Round #326 (Div. 1) B. Duff in Beach - 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>2015-10-17 13:30:35</published>
  <title>Codeforces Round #326 (Div. 1) B. Duff in Beach</title>
  <type>rich</type>
  <url>https://mayokoex.hatenablog.com/entry/2015/10/17/133035</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
