<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>mmxsrup</author_name>
  <author_url>https://blog.hatena.ne.jp/mmxsrup/</author_url>
  <blog_title>srupのメモ帳</blog_title>
  <blog_url>https://mmxsrup.hatenablog.com/</blog_url>
  <categories>
    <anon>yukicoder</anon>
    <anon>数学</anon>
  </categories>
  <description>問題 問題概要 そろばんの一列でいくつ数得られる? 下の制約強化版 mmxsrup.hatenablog.com 解法 そろばんの上の玉がy、下がxとすると、数得られる数は、 (x + 1)y + x -(1) という式で表されて、 条件から、 x + y = n -(2) という式も導かれるので、 yを消去すると求める答えは、下の式が最大となる時である。 (x + 1)(n - x) + x = -x2 + xn + n 最大をxに対して全探索していると、TLEとなるので、 これを平方完成して、-(x - n / 2) + n2 / 4 + n となり、最大となるのはx = n / 2となる…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmmxsrup.hatenablog.com%2Fentry%2F2016%2F08%2F26%2F154200&quot; title=&quot;yukicoder No.72 そろばん Med - srupのメモ帳&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-08-26 15:42:00</published>
  <title>yukicoder No.72 そろばん Med</title>
  <type>rich</type>
  <url>https://mmxsrup.hatenablog.com/entry/2016/08/26/154200</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
