<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>moistx</author_name>
  <author_url>https://blog.hatena.ne.jp/moistx/</author_url>
  <blog_title>Logfiles</blog_title>
  <blog_url>https://logfiles.hatenablog.com/</blog_url>
  <categories>
    <anon>SRM</anon>
  </categories>
  <description>問題 与えられたこのなる数字の書かれたカードの中から一枚ずつ選んで取り除くゲームをする。 取り除く際に、もし選んだカードの数字と前後の数字を持つカードが存在すれば、それぞれも抜き取らなければならない。カードを選べる回数を最大化せよ。解法 ソートして小さい順に取り除くだけ。見ている数より1つ大きい数字が合った場合、ループのカウントを1つ増やしてスキップ処理をする。 class SRMCards { public: int maxTurns(vector &lt;int&gt; cards) { sort(ALL(cards)); int const N = cards.size(); vector&lt;bool…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Flogfiles.hatenablog.com%2Fentry%2F20140519%2F1400496353&quot; title=&quot;SRM500 Div2 SRMCards - Logfiles&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>2014-05-19 19:45:53</published>
  <title>SRM500 Div2 SRMCards</title>
  <type>rich</type>
  <url>https://logfiles.hatenablog.com/entry/20140519/1400496353</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
