<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tatsuhiro_t</author_name>
  <author_url>https://blog.hatena.ne.jp/tatsuhiro_t/</author_url>
  <blog_title>興味ないね</blog_title>
  <blog_url>https://tatsuhiro-t.hatenadiary.org/</blog_url>
  <categories>
  </categories>
  <description>入力文章は文字数が l1, l2, ..., ln の n 個の単語の列です. この文章を 1 行最大 M 文字の行に印字したいとします. 同じ行の単語と単語の間には空白が一つ入ります. 最終行を除く, 各行の行端の空白の三乗和を最小にするように印字するアルゴリズムを考えよ, という問題です.問題文にもあるように動的計画法にて解くことを考えます. ここでは行端の空白の三乗和の最小値を出力するプログラムを作成しました. S[i,j] を単語 i から単語 j を使ったときの行端の空白の三乗和であるとします. 求めるものは, S[1,n] になります. 単語 i から j の長さの和を sumw(…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftatsuhiro-t.hatenadiary.org%2Fentry%2F20090828%2F1251471198&quot; title=&quot; アルゴリズム イントロダクション 章末問題 15-2 プリンタによる浄書 - 興味ないね&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>2009-08-28 23:53:18</published>
  <title> アルゴリズム イントロダクション 章末問題 15-2 プリンタによる浄書</title>
  <type>rich</type>
  <url>https://tatsuhiro-t.hatenadiary.org/entry/20090828/1251471198</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
