<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>mmxsrup</author_name>
  <author_url>https://blog.hatena.ne.jp/mmxsrup/</author_url>
  <blog_title>srupのメモ帳</blog_title>
  <blog_url>https://mmxsrup.hatenablog.com/</blog_url>
  <categories>
    <anon>yukicoder</anon>
    <anon>bitDP</anon>
  </categories>
  <description>問題 問題概要 巡回セールスマン問題に辺のコストを加えたもの。 解法 巡回セールスマン問題ですね。bitDPで解きました。ただ今回の問題は、荷物をどれだけ持っているかで、1単位を移動するのにかかる時間が異なるので、それを前計算で、weight[mask] := mask集合を訪れた時に荷物の合計値を計算しておく。あとは、ddp[mask][i] := mask集合を巡って、iにいるときの最小コスト としてループで回して計算していく。 答えは、dp[(1 &lt;&lt; (n + 1)) - 1][0]と、荷物を下すのにかかる時間(w1からw2の合計)である。荷物を下すのにかかる時間はどのような順番で街を…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmmxsrup.hatenablog.com%2Fentry%2F2016%2F10%2F21%2F155306&quot; title=&quot;yukicoder No.134 走れ！サブロー君 - srupのメモ帳&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-10-21 15:53:06</published>
  <title>yukicoder No.134 走れ！サブロー君</title>
  <type>rich</type>
  <url>https://mmxsrup.hatenablog.com/entry/2016/10/21/155306</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
