<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>inamori</author_name>
  <author_url>https://blog.hatena.ne.jp/inamori/</author_url>
  <blog_title>inamori’s diary</blog_title>
  <blog_url>https://inamori.hateblo.jp/</blog_url>
  <categories>
    <anon>PE</anon>
    <anon>数学</anon>
    <anon>プログラミング</anon>
  </categories>
  <description>メモ化（memoize）は、Project Eulerで何問かに1問必ず使う手法なので、絶対に覚えましょう。 Project EulerのProblem 151を考えます。意味が分かりにくい問題ですが、分かれば簡単です。まず最初にA1の紙が1枚封筒に入った状態を考えます。この状態を (1, 0, 0, 0, 0) と表します。各項は各サイズの紙の枚数です。次にA1の紙を1枚取り出して、切ってA2〜A5を1枚ずつ封筒に戻します。この状態は、 (0, 1, 1, 1, 1) と表します。この状態からどの大きさの紙を取り出す確率も1/4です。例えばA3の紙を取り出して切ってA5の紙を使うと、 (0,…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Finamori.hateblo.jp%2Fentry%2F20101028%2Fp1&quot; title=&quot;メモ化 - inamori’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>2010-10-28 00:00:00</published>
  <title>メモ化</title>
  <type>rich</type>
  <url>https://inamori.hateblo.jp/entry/20101028/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
