<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>mayokoex</author_name>
  <author_url>https://blog.hatena.ne.jp/mayokoex/</author_url>
  <blog_title>mayoko’s diary</blog_title>
  <blog_url>https://mayokoex.hatenablog.com/</blog_url>
  <categories>
    <anon>CodeForces</anon>
  </categories>
  <description>問題 codeforces.com 解法 まず単純な解法を考えてみます。目標になる値を決めると, 各値(vals という配列にまとめておくことにします)を目標の値にするために必要なコストが決定します(t だけ contribution を増やしたいとすると, t/5 * c1 + (t%5)*c がかかるコストの最小値(c1 は 5 増やすのに必要なコスト, c は 1 増やすのに必要なコスト))。なので, n 人それぞれの contribution を調べれば, 各目標値に対して O(N) でコストを調べることができるので, 時間はかかるけど答えは得られそうです。また, 目標値としてあり得る…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmayokoex.hatenablog.com%2Fentry%2F2016%2F03%2F31%2F235502&quot; title=&quot;VK Cup 2016 - Round 1 D. Bear and Contribution - mayoko’s diary&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>2016-03-31 23:55:02</published>
  <title>VK Cup 2016 - Round 1 D. Bear and Contribution</title>
  <type>rich</type>
  <url>https://mayokoex.hatenablog.com/entry/2016/03/31/235502</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
