<?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>AtCoder</anon>
  </categories>
  <description>問題 s8pc-2.contest.atcoder.jp 解法 文字列が共通している場合, i1 からスタートする文字列 i2 からスタートする文字列 が一致している, というようになっているはずです。S[i1:N), S[i2:N) に共通文字列がある場合, それらの文字は辞書順的に連続である, と考えると suffix array -&gt; lcp を考える流れが出てきます。共通している文字の分は後に回すと考えると, i 番目の index では maxi = N-i+1, mini = lcp[i]+1 として (mini+maxi)*(maxi-mini+1)/2 だけこの文字でカウントさ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmayokoex.hatenablog.com%2Fentry%2F2016%2F04%2F27%2F144007&quot; title=&quot;square869120Contest #2 E - 部分文字列 - 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-04-27 14:40:07</published>
  <title>square869120Contest #2 E - 部分文字列</title>
  <type>rich</type>
  <url>https://mayokoex.hatenablog.com/entry/2016/04/27/144007</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
