<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>obelisk2</author_name>
  <author_url>https://blog.hatena.ne.jp/obelisk2/</author_url>
  <blog_title>Camera Obscura</blog_title>
  <blog_url>https://obelisk.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
    <anon>アルゴリズム・パズル</anon>
  </categories>
  <description>問題： 長方形状に横 5 個、縦 4 個の格子点が全部で 20個、等間隔に並んでいます。このすべての格子点を一筆書き（交差してはならない）で辿るとすると、その辿り方は全部で何とおりあるでしょうか。 ただし進む方向は上下左右のみで、また始点と終点が反対になっているだけで同じパターンは除外することにします。 Ruby で解いてみます。 q62.rb m, n = 5, 4 count = 0 solve = -&gt;(x, y, history) { if history.size == m * n count += 1 else [[1, 0], [-1, 0], [0, 1], [0, -1]].…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fobelisk.hatenablog.com%2Fentry%2F2018%2F08%2F20%2F225639&quot; title=&quot;交差せずに一筆書き（Ruby） - Camera Obscura&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://images-fe.ssl-images-amazon.com/images/I/51UODCJtLqL._SL160_.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2018-08-20 22:56:39</published>
  <title>交差せずに一筆書き（Ruby）</title>
  <type>rich</type>
  <url>https://obelisk.hatenablog.com/entry/2018/08/20/225639</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
