<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>yebityon</author_name>
  <author_url>https://blog.hatena.ne.jp/yebityon/</author_url>
  <blog_title>予鈴</blog_title>
  <blog_url>https://yebityon.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>問題 長いので、リンクを踏んでください atcoder.jp 考察 ・にない文字がに含まれる場合は明らかに-1 ・部分列で構成しなければいけないので、単にに使う文字が出てくるまでを増やすのはダメ ・1時間ぐらい考えて二分探索が生える。ここから4時間ぐらい溶かす。 反省点 二分探索で得るべき値は、一つ前の文字より真に大きいindexを持つ.これは、をkeyとする配列で達成することができる。 間違ったアプローチのコードがこれ。 各文字ごとに最後に使ったindexを記録しておいて、その値を元に二分探索の範囲を限定する。 そもそも異なる文字のindexが最後に記録したindexより先に来る場合がある。…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyebityon.hatenablog.com%2Fentry%2F2019%2F09%2F12%2F183311&quot; title=&quot;E - Strings of Impurity - 予鈴&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://chart.apis.google.com/chart?cht=tx&amp;chl=%20s</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-09-12 18:33:11</published>
  <title>E - Strings of Impurity</title>
  <type>rich</type>
  <url>https://yebityon.hatenablog.com/entry/2019/09/12/183311</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
