<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>parukii</author_name>
  <author_url>https://blog.hatena.ne.jp/parukii/</author_url>
  <blog_title>parukiのブログ</blog_title>
  <blog_url>https://par.hateblo.jp/</blog_url>
  <categories>
    <anon>木</anon>
    <anon>グラフ彩色</anon>
    <anon>再帰</anon>
  </categories>
  <description>解法 木の問題は、根付き木にすると見通しが立てやすくなることが多い。 根から再帰的に色を塗っていく。 ある頂点vの色をcur_col, 親の色をpar_colとする。また、部分木vのうち色が決まっているのはvだけとする。子の色を決めたい。問題文中の色を塗る条件をわかりやすく言い換えると、距離2以内の頂点の色は異なるということになる。あるvの子c[i]の色に対して、距離2以内に来る頂点ですでに色が決まっている、または一緒に色を決めなければならない頂点は以下の通り。 (1) 頂点v(cur_col) (2) 頂点vの親(par_col) (3) 別のvの子c[j] (i!=j) つまり、下の図のよ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpar.hateblo.jp%2Fentry%2F2017%2F03%2F06%2F111644&quot; title=&quot;Codeforces #403 (Div. 2) C: Andryusha and Colored Balloons - parukiのブログ&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>https://cdn-ak.f.st-hatena.com/images/fotolife/p/parukii/20170306/20170306111411.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2017-03-06 11:16:44</published>
  <title>Codeforces #403 (Div. 2) C: Andryusha and Colored Balloons</title>
  <type>rich</type>
  <url>https://par.hateblo.jp/entry/2017/03/06/111644</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
