<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>nya__nya</author_name>
  <author_url>https://blog.hatena.ne.jp/nya__nya/</author_url>
  <blog_title>メモ帳</blog_title>
  <blog_url>https://nyaonn.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>問題文頂点の木が与えられます。 木とはグラフの一種であり、頂点の数をとすると、辺の数がN-1本である閉路の無い連結グラフです。 番目の辺は頂点と頂点を距離で結びます。 また、Q個の質問クエリと整数が与えらえます。 番目の質問クエリでは、頂点から頂点を経由しつつ、頂点まで移動する場合の最短経路の距離を求めて下さい。 atcoder.jp 考えたこと 頂点から頂点への頂点を経由する場合の最短経路は、頂点からへの最短経路と頂点からへの最短経路の和で求まる。 最初ダイクストラ法で実装しようとしたが、よく考えたら、閉路が無い木構造であり、ある頂点からある頂点までの経路が一つしかないため、深さ優先探索(d…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnyaonn.hatenablog.com%2Fentry%2F2021%2F04%2F24%2F105723&quot; title=&quot;木構造の最短経路問題　ABC-70D Transit Tree Path - メモ帳&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>2021-04-24 10:57:23</published>
  <title>木構造の最短経路問題　ABC-70D Transit Tree Path</title>
  <type>rich</type>
  <url>https://nyaonn.hatenablog.com/entry/2021/04/24/105723</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
