<?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://onlinejudge.u-aizu.ac.jp/beta/review.html#RitsCamp18Day2/2751424まず個数Mは無視して、価値を最大化するようにボールを取ってみよう。 すると、各色について価値の大きい順に取れるだけボールを取れば最適となる。 元の問題で使われるボールはここで使われたボールから選ばれる。 あとは、このボールを全て集めて価値の大きい順に最大M個ボールを取れば答えとなる。 int N, M, C, l[101010], c[101010], w[101010]; vector&lt;int&gt; v[101010]; //-----------…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.hamayanhamayan.com%2Fentry%2F2018%2F03%2F27%2F165647&quot; title=&quot;Ball [RUPC2018 Day2 C] - はまやんはまやんはまやん&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>2018-03-27 16:56:47</published>
  <title>Ball [RUPC2018 Day2 C]</title>
  <type>rich</type>
  <url>https://blog.hamayanhamayan.com/entry/2018/03/27/165647</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
