{"description":"\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9 DP\u306e\u6f38\u5316\u5f0f\u306e\u7acb\u3066\u65b9\u3092\u9593\u9055\u3048\u307e\u3057\u305f\u3002\u6700\u521d\u306f dp[i] = Math.Max(dp[i - 1], dp[i - 2] + donations[i]); \u3060\u3068\u601d\u3063\u305f\u3093\u3067\u3059\u304c\u3001\uff12\u3064\u98db\u3070\u3057\u3066\u3082\u6700\u5927\u306b\u306a\u308b\u5834\u5408\u304c\u3042\u308b\u306e\u3067\u3053\u308c\u3067\u306f\u3060\u3081\u3067\u3059\u306d\u3002 \u6700\u5f8c\u306e\u5bb6\u304b\u3089\u5bc4\u4ed8\u3092\u3082\u3089\u3046\u30b1\u30fc\u30b9\u3092\u3069\u3046\u6271\u3046\u304b\u306b\u3064\u3044\u3066\u3082\u308f\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002 \u521d\u671f\u5024\u304c\u8907\u6570\u30d1\u30bf\u30fc\u30f3\u3042\u308b\u5834\u5408\u3001DP\u3092\u8907\u6570\u56de\u3084\u3089\u306a\u3044\u3068\u3060\u3081\u3067\u3059\u306d\u3002 using System; using System.Collections.Generic; using System.Text; public class BadNeighbors { public int \u2026","height":"190","blog_url":"https://anton0825.hatenablog.com/","provider_name":"Hatena Blog","image_url":null,"width":"100%","type":"rich","title":"TCCC\u30002004 Round4\u3000Easy","author_name":"anton0825","url":"https://anton0825.hatenablog.com/entry/20110223/1298565487","author_url":"https://blog.hatena.ne.jp/anton0825/","provider_url":"https://hatena.blog","blog_title":"\u65e5\u3005\u7cbe\u9032","categories":["IT","TopCoder"],"published":"2011-02-23 01:38:07","version":"1.0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fanton0825.hatenablog.com%2Fentry%2F20110223%2F1298565487\" title=\"TCCC\u30002004 Round4\u3000Easy - \u65e5\u3005\u7cbe\u9032\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>"}