<?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://yukicoder.me/problems/no/731 前提知識 最小二乗法 解法 https://yukicoder.me/submissions/283487N個の数を頂点(i, A[i])として考えると、求めたい答えはちょうど線形近似になっている。 そのため、線形近似式を最小二乗法で求めよう。 もう少し具体的にはこのサイトに載っている式からy=ax+bのa,bが求まる。 これで初項bと公差（傾き）aが得られたので、必要なコストはyとの差の二乗の総和となる。 int N, A[1010]; //---------------------------------------…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.hamayanhamayan.com%2Fentry%2F2018%2F09%2F07%2F233334&quot; title=&quot;等差数列がだいすき [yukicoder No.731] - はまやんはまやんはまやん&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-09-07 23:33:34</published>
  <title>等差数列がだいすき [yukicoder No.731]</title>
  <type>rich</type>
  <url>https://blog.hamayanhamayan.com/entry/2018/09/07/233334</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
