<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>thescript1210</author_name>
  <author_url>https://blog.hatena.ne.jp/thescript1210/</author_url>
  <blog_title>ひらめの日常</blog_title>
  <blog_url>https://hiramekun.hatenablog.com/</blog_url>
  <categories>
    <anon>競技プログラミング</anon>
    <anon>解法メモ</anon>
    <anon>codeforces</anon>
    <anon>計算量</anon>
  </categories>
  <description>問題はこちら codeforces.com 長さ の 配列 が与えられる。一回の操作によって任意の要素一つ、 を2で割って切り捨てることを行う。 （つまり、 ） 個の等しい要素を 中で得るには、何回操作を行えばいいか、その最小値を求めよ。 考え方 全ての を、0になるまで割る2して、各値を得るまでにかかった作業回数を記録しておく。コードの方がわかりやすいと思うのでその部分を抜粋する。 while (a[i] &gt; 0) { mp[a[i]].emplace_back(t); a[i] /= 2; t++; } そして、存在している全ての要素に対して以下を行う。 要素数が よりも以上の場合は、要素…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhiramekun.hatenablog.com%2Fentry%2F2019%2F08%2F31%2F193600&quot; title=&quot;Codeforces Round #582 (Div. 3) D. Equalizing by Division - ひらめの日常&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.blog.st-hatena.com/images/theme/og-image-1500.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-08-31 19:36:00</published>
  <title>Codeforces Round #582 (Div. 3) D. Equalizing by Division</title>
  <type>rich</type>
  <url>https://hiramekun.hatenablog.com/entry/2019/08/31/193600</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
