<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>anton0825</author_name>
  <author_url>https://blog.hatena.ne.jp/anton0825/</author_url>
  <blog_title>日々精進</blog_title>
  <blog_url>https://anton0825.hatenablog.com/</blog_url>
  <categories>
    <anon>IT</anon>
    <anon>TopCoder</anon>
  </categories>
  <description>ソースコード DPの漸化式の立て方を間違えました。最初は dp[i] = Math.Max(dp[i - 1], dp[i - 2] + donations[i]); だと思ったんですが、２つ飛ばしても最大になる場合があるのでこれではだめですね。 最後の家から寄付をもらうケースをどう扱うかについてもわかりませんでした。 初期値が複数パターンある場合、DPを複数回やらないとだめですね。 using System; using System.Collections.Generic; using System.Text; public class BadNeighbors { public int …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fanton0825.hatenablog.com%2Fentry%2F20110223%2F1298565487&quot; title=&quot;TCCC　2004 Round4　Easy - 日々精進&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>2011-02-23 01:38:07</published>
  <title>TCCC　2004 Round4　Easy</title>
  <type>rich</type>
  <url>https://anton0825.hatenablog.com/entry/20110223/1298565487</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
