<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>mayokoex</author_name>
  <author_url>https://blog.hatena.ne.jp/mayokoex/</author_url>
  <blog_title>mayoko’s diary</blog_title>
  <blog_url>https://mayokoex.hatenablog.com/</blog_url>
  <categories>
    <anon>AtCoder</anon>
  </categories>
  <description>問題 arc052.contest.atcoder.jp 解法 まず自明な解法として, d[v][b] = (頂点 v までに, b 回タイプ B の道を通る場合の最短距離)というのがあります。b は N より大きかったらどこかの頂点を複数回通っていることになるので, 頂点の個数は O(N^2) でダイクストラをすれば良いです。これだともちろん TLE, MLE をするんですが, これを工夫することで解が得られます。need[v] = (頂点 v まで行くのに最低限必要な B の辺の本数)というのを前計算しておきます。 すると, need[v] よりも SIZE = 1.5*sqrt(N) 本…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmayokoex.hatenablog.com%2Fentry%2F2016%2F05%2F01%2F194329&quot; title=&quot;AtCoder Regular Contest 052 C - 高橋くんと不思議な道 - mayoko’s diary&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>2016-05-01 19:43:29</published>
  <title>AtCoder Regular Contest 052 C - 高橋くんと不思議な道</title>
  <type>rich</type>
  <url>https://mayokoex.hatenablog.com/entry/2016/05/01/194329</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
