<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>h_chiro</author_name>
  <author_url>https://blog.hatena.ne.jp/h_chiro/</author_url>
  <blog_title>雑記</blog_title>
  <blog_url>https://h-chiro.hatenablog.com/</blog_url>
  <categories>
    <anon>PKU</anon>
  </categories>
  <description>http://poj.org/problem?id=3272 概要 DAGが与えられる。 初期地点が入ってくる辺のない点、最終地点が一番番号の大きな点となるようなパスをすべて考えて そのようなパスにもっとも多く入っている辺は、いくつのパスに含まれるか求める問題。 方針 ある点から最終地点までのパスの数と、ある点までのパスの数とをあらかじめ深さ優先探索して求めておく。 すべての辺に対して、(辺の始点までのパスの数)*(辺の終点から最終地点までのパスの数)の最大値が答えになる。 DFSにO(N)、最大値を求めるのにO(M)かかるので全体でO(N+M)になる。 ソース #include&lt;cstdio…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fh-chiro.hatenablog.com%2Fentry%2F20101104%2F1288886383&quot; title=&quot; 3272 Cow Traffic - 雑記&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>2010-11-04 00:59:43</published>
  <title> 3272 Cow Traffic</title>
  <type>rich</type>
  <url>https://h-chiro.hatenablog.com/entry/20101104/1288886383</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
