<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ganmacs</author_name>
  <author_url>https://blog.hatena.ne.jp/ganmacs/</author_url>
  <blog_title>memo-mode</blog_title>
  <blog_url>https://ganmacs.hatenablog.com/</blog_url>
  <categories>
    <anon>アルゴリズム</anon>
    <anon>Ruby</anon>
  </categories>
  <description>彩色問題 アリ本の93ページ 隣接したりノードが同じ色にならないように色をぬる。 今回は２色で塗ることができるかという問題 特に２色でぬれるグラフを２部グラフという コードで言うと0が塗ってないノードなので下の２つを繰り返す感じ 隣接したノードjが0ならノードjに対して色(-c)を塗る 隣接したノードjと現在のノードがiが同じ色c(1 or 0)ならfalseを返す G1 = [[0, 1, 1], [1, 0, 1], [1, 1, 0]].freeze G2 = [[0, 1, 0, 1], [1, 0, 1, 0], [0, 1, 0, 1], [1, 0, 1, 0]].freeze …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fganmacs.hatenablog.com%2Fentry%2F2014%2F08%2F04%2F235203&quot; title=&quot;今日解いた問題2 - memo-mode&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-08-04 23:52:03</published>
  <title>今日解いた問題2</title>
  <type>rich</type>
  <url>https://ganmacs.hatenablog.com/entry/2014/08/04/235203</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
