<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>moistx</author_name>
  <author_url>https://blog.hatena.ne.jp/moistx/</author_url>
  <blog_title>Logfiles</blog_title>
  <blog_url>https://logfiles.hatenablog.com/</blog_url>
  <categories>
    <anon>TopCoder</anon>
    <anon>SRM</anon>
  </categories>
  <description>問題概要 テーブルに有るコインを４方向にずらして枠外に振り落とせる。テーブル上に残るコインの数が、与えられた数Kに一致するための最小のテーブルの移動回数を求めよ。解法 制約が小さく、テーブルが 30*30 なので単なる6重ループで求まるはずだが、二次元の累積和を取った4重ループでも解答可能。以下のコードは4重ループのコード。またテーブルからコインを振り落とす際に盤面全体が移動していくので、四方向のうち反対の方向にずらそうとするときがあるので、それを注意して計算式を書く必要がある。解答では、押して引いた際に消費回数が小さい方向をみて、それを押し（引き）の分の２倍で求めている。反省 600点問題だ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Flogfiles.hatenablog.com%2Fentry%2F20140402%2F1396458077&quot; title=&quot;SRM525 Div2Med DropCoins - Logfiles&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>2014-04-02 02:01:17</published>
  <title>SRM525 Div2Med DropCoins</title>
  <type>rich</type>
  <url>https://logfiles.hatenablog.com/entry/20140402/1396458077</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
