<?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>POJ</anon>
  </categories>
  <description>suffix array まわりの問題をあんまり解いたことがないので解いてみました。蟻本のやつです。 問題 3581 -- Sequence 解法 蟻本 338 ページに書いてある通りです。最初の区切りは「一番大きい数が一番前にある」という制約から, 数列を逆順に見た時の接尾辞で辞書順最小のものを選べば良いことがわかります。これはよくある suffix array ですね(ただし, 「各部分は空であってはいけない」という制約から, 最初に区切るべき位置 p1 は, N-p1 &gt;= 2 を満たさなければならないことに注意)。残りの部分を 2 つに分けたいです。別れた時の各数列が p, q で, …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmayokoex.hatenablog.com%2Fentry%2F2016%2F04%2F04%2F195930&quot; title=&quot;POJ 3581: Sequence - 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-04 19:59:30</published>
  <title>POJ 3581: Sequence</title>
  <type>rich</type>
  <url>https://mayokoex.hatenablog.com/entry/2016/04/04/195930</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
