<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>betrue12</author_name>
  <author_url>https://blog.hatena.ne.jp/betrue12/</author_url>
  <blog_title>ARMERIA</blog_title>
  <blog_url>https://betrue12.hateblo.jp/</blog_url>
  <categories>
    <anon>AtCoder</anon>
    <anon>プログラミング</anon>
    <anon>競技プログラミング</anon>
  </categories>
  <description>F - Heights and Pairs 解法 まずは入力を各身長ごとの人数として集計します。 を身長が である人の人数とします。 であり、 人であるような身長を無視すれば身長の種類数は 以下です。 条件を満たす組み方をDPなどで直接数えようとすると、 から落ちず厳しいです。 包除原理を適用します。同じ身長で組んでいるペアを「違反ペア」と呼ぶことにして、違反ペアを 個以上集めた集合を とします。「 に含まれるペアは必ず組んであって、その他のペアは自由に組まれているような組み方の数」を とすると、答えは包除原理から と計算できます。集合 の取り方は膨大にあるので のサイズごとに集計することにし…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbetrue12.hateblo.jp%2Fentry%2F2020%2F09%2F27%2F043205&quot; title=&quot;ACL Beginner Contest F - Heights and Pairs - ARMERIA&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/106916089/1592411661884548</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-09-27 04:32:05</published>
  <title>ACL Beginner Contest F - Heights and Pairs</title>
  <type>rich</type>
  <url>https://betrue12.hateblo.jp/entry/2020/09/27/043205</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
