<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Area1</author_name>
  <author_url>https://blog.hatena.ne.jp/Area1/</author_url>
  <blog_title>Area1のif(memo[i][j])</blog_title>
  <blog_url>https://area.hateblo.jp/</blog_url>
  <categories>
    <anon>貪欲</anon>
    <anon>POJ</anon>
  </categories>
  <description>問題文長さPの数列が与えられて偶数秒にはその数列から数字を選んで足す、奇数秒には選んで引く。これを0秒から始める。i+1秒で選ぶ数字はi秒で選んだ数字より数列中で後のものでなくてはならない。最大和を求めよ、という問題。DP強化週間のつもりが、たんに数列の山と谷の数字を足し引きするだけだった。 数列が増加しながら終わるときに足し忘れないよう気をつける。以下ソース。 int main(int argc, char **argv){ int P; scanf(&quot;%d&quot;, &amp;P); bool ascend = false; int prev = 0; int ans = 0; for(int i = …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Farea.hateblo.jp%2Fentry%2F2013%2F02%2F06%2F212035&quot; title=&quot;POJ 2181 Jumping Cows - Area1のif(memo[i][j])&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>2013-02-06 21:20:35</published>
  <title>POJ 2181 Jumping Cows</title>
  <type>rich</type>
  <url>https://area.hateblo.jp/entry/2013/02/06/212035</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
