<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>geam1113</author_name>
  <author_url>https://blog.hatena.ne.jp/geam1113/</author_url>
  <blog_title>geam1113’s diary</blog_title>
  <blog_url>https://geam1113.hatenablog.com/</blog_url>
  <categories>
    <anon>ABC</anon>
    <anon>Mo</anon>
  </categories>
  <description>解説AC 問題へのリンク 解説へのリンク 初Mo's Algotithm Mo's Algorithmの適用可能条件は以下の通りです。 配列が不変 クエリ先読み可 区間を+1, -1ずつ伸縮しても値の再計算が容易 1,2は満たすので3が満たせればよく、以下の方法で容易に計算できることがわかります。 :区間内のの出現数 とします。最大のペア数は、以下のように計算できます。 区間を伸長した時 新たに区間内となるものをとすると、伸長前にが奇数なら、ペアを新たに作れるのでを+1する。 区間を短縮した時 新たに区間外となるものをとすると、短縮前にが偶数なら、ペアが1つ減るのでを-1する。 よって、Mo'…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgeam1113.hatenablog.com%2Fentry%2F2022%2F03%2F17%2F075759&quot; title=&quot;ABC242G Range Pairing Query - geam1113’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>2022-03-17 07:57:59</published>
  <title>ABC242G Range Pairing Query</title>
  <type>rich</type>
  <url>https://geam1113.hatenablog.com/entry/2022/03/17/075759</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
