<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hamayanhamayan</author_name>
  <author_url>https://blog.hatena.ne.jp/hamayanhamayan/</author_url>
  <blog_title>はまやんはまやんはまやん</blog_title>
  <blog_url>https://blog.hamayanhamayan.com/</blog_url>
  <categories>
    <anon>競技プログラミング</anon>
  </categories>
  <description>https://yukicoder.me/problems/no/866 解説 https://yukicoder.me/submissions/370328 結構計算量が厳しいらしいので、ゴリゴリ計算系であろうと思う。 全探索で考えると、左上をHW通り試し、正方形の一片を試してmin(W,H)通り試す。 これだと間に合わない。 間に合わないが、正方形の一片をどんどん大きくしていくと、種類数はどんどん増えていく。 二分探索すればちょうどP種類の時が見つけられる。 あとは、区間にある種類数を高速に求めたい。 26種類を二次元累積和で管理して、何種類あるか求めよう。 これで計算量はO(HWlog(…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.hamayanhamayan.com%2Fentry%2F2019%2F08%2F18%2F090115&quot; title=&quot;レベルKの正方形 [yukicoder 866]
 - はまやんはまやんはまやん&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>2019-08-18 09:01:15</published>
  <title>レベルKの正方形 [yukicoder 866]
</title>
  <type>rich</type>
  <url>https://blog.hamayanhamayan.com/entry/2019/08/18/090115</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
