<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>babcs2035</author_name>
  <author_url>https://blog.hatena.ne.jp/babcs2035/</author_url>
  <blog_title>きろく</blog_title>
  <blog_url>https://babcs2035.hateblo.jp/</blog_url>
  <categories>
    <anon>競技プログラミング</anon>
    <anon>yukicoder レベル 2.5 問題</anon>
  </categories>
  <description>問題 解法 解答 問題 yukicoder.me 解法 コインの枚数の境目は最大でも 2 * N 個しかできないので，コインの数字を座標圧縮することを考える．そうすると，空間計算量を O(N) に減らせる．各コインの枚数の区間において，その区間に属するもともとのコインの種類は，座標圧縮時に逆配列を作るなどしておけば O(1) で求まるため，愚直に小さいコインから K 個目までを数えればよい．O(NlogN)． 解答 yukicoder.me</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbabcs2035.hateblo.jp%2Fentry%2F2019%2F04%2F20%2F202530&quot; title=&quot;yukicoder：No.817 Coin donation - きろく&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-ak.f.st-hatena.com/images/fotolife/b/babcs2035/20190420/20190420202516.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-04-20 20:25:30</published>
  <title>yukicoder：No.817 Coin donation</title>
  <type>rich</type>
  <url>https://babcs2035.hateblo.jp/entry/2019/04/20/202530</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
