<?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>http://projecteuler.net/index.php?section=problems&amp;id=149 よく考えたら、これって左から順に考えたほうが簡単ですね。そうすると、全体の和、最大の和、右端を含む最大の和の3つを考えれば済みます。こうするとコードがすっきりした上、46秒でした。再帰使わないから速いんでしょうか。 def max_sum(a): def add(s, e): return (s[0] + e, max(s[1], s[2] + e), max(s[2] + e, e)) return reduce(add, a, (0, 0, 0)) ちなみに、C++で組んだら…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Finamori.hateblo.jp%2Fentry%2F20100814%2Fp1&quot; title=&quot;Project Euler 149（2） - 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-08-14 00:00:00</published>
  <title>Project Euler 149（2）</title>
  <type>rich</type>
  <url>https://inamori.hateblo.jp/entry/20100814/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
