<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>drken1215</author_name>
  <author_url>https://blog.hatena.ne.jp/drken1215/</author_url>
  <blog_title>けんちょんの競プロ精進記録</blog_title>
  <blog_url>https://drken1215.hatenablog.com/</blog_url>
  <categories>
    <anon>Codeforces</anon>
    <anon>EducationalCodeforces</anon>
    <anon>CodeforcesR1700</anon>
    <anon>文字列</anon>
    <anon>辞書順</anon>
    <anon>推移性に着目する</anon>
    <anon>prefixとsuffix</anon>
    <anon>順列の最適化問題</anon>
    <anon>解空間:O(N!)通りの選択肢</anon>
    <anon>順列テク:順列は互換(swap操作)の積として表せる</anon>
    <anon>そのまま覚えたいシンプル設定の中堅以上の典型問題</anon>
    <anon>思わず解きたくなる興味深い良問</anon>
    <anon>順列を題材とした問題</anon>
    <anon>非自明な比較関数でソートする</anon>
    <anon>N個の文字列の問題</anon>
    <anon>考察：順序を工夫して解く</anon>
    <anon>SuffixArray</anon>
  </categories>
  <description>すごくシンプルな面白い問題。 問題へのリンク 問題概要 個の文字列 が与えられる。 これらを並び替えて連結して 1 つの文字列を作る。作れる文字列のうち、辞書順最小のものを求めよ。 制約 解法 単純に を辞書順にソートして、小さい順に連結するのでは反例がある。 たとえば = &quot;ab&quot;、 = &quot;abaab&quot; のとき、 辞書順に並び替えると で、この順に連結すると &quot;ababaab&quot; になる を先に連結すると、&quot;abaabab&quot; になる 後者の方が辞書順として小さい。 a + b &lt; b + a で定義 そこで、 個の文字列に対して、辞書順に代わる新たな順序を定義する。文字列 に対して と定義する…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fdrken1215.hatenablog.com%2Fentry%2F2022%2F12%2F16%2F194300&quot; title=&quot;Educational Codeforces Round 9 C. The Smallest String Concatenation (R1700) - けんちょんの競プロ精進記録&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>https://cdn.user.blog.st-hatena.com/default_entry_og_image/80936665/1516148889515660</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-12-16 19:43:00</published>
  <title>Educational Codeforces Round 9 C. The Smallest String Concatenation (R1700)</title>
  <type>rich</type>
  <url>https://drken1215.hatenablog.com/entry/2022/12/16/194300</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
