<?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>AOJ</anon>
  </categories>
  <description>概要 二分木が入力されるので Intersect または Union して出力せよ。解法以下がBNF。 := ( , ) | ε 一つの親ノードと２つの子ノードの３つのノードについての処理を考える。つまりカンマの位置を特定することが必要なのでその方法を考える。 先頭の'('を読み飛ばしてから、'('が来たらカウントを1増やし、')'が来たらカウントを1減らす操作をする。カウントが0になったときにカンマの位置が発見できるので前後の文字列が分割可能。(A,B)というように分割が完了したら、AとB両方について再帰をしていく。BNFの通り再帰の終了条件を空文字列とすれば二分木の構文解析が終了する。次に…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Flogfiles.hatenablog.com%2Fentry%2F20140413%2F1397378725&quot; title=&quot;AOJ1001 Binary Tree Intersection And Union - 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-13 17:45:25</published>
  <title>AOJ1001 Binary Tree Intersection And Union</title>
  <type>rich</type>
  <url>https://logfiles.hatenablog.com/entry/20140413/1397378725</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
