<?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>TopCoder</anon>
    <anon>SRM</anon>
  </categories>
  <description>問題概要 vector parent が与えられる。parent[i] とは i 番目のノードの親が parent[i] であることを示す。deletedCell で削除するノードが与えられたとき、残ったノードのうち葉のノードの数をカウントせよ。解法 子を参照する形の木を、与えられた vector parent から生成し、削除するノードで打ち切って dfs していけばよい。 vector &gt; tree; に対して、tree[ parent[i] ].push_back(i); を for文で回すと木が生成できる。ただし、木全体の親ノードに対しては parent[i] = -1 となるので、t…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Flogfiles.hatenablog.com%2Fentry%2F20140416%2F1397655200&quot; title=&quot;SRM435 Div1Easy(Div2Med) CellRemoval - 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-04-16 22:33:20</published>
  <title>SRM435 Div1Easy(Div2Med) CellRemoval</title>
  <type>rich</type>
  <url>https://logfiles.hatenablog.com/entry/20140416/1397655200</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
