<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>JunKobayashi</author_name>
  <author_url>https://blog.hatena.ne.jp/JunKobayashi/</author_url>
  <blog_title>JunKobayashi's Diary</blog_title>
  <blog_url>https://junkobayashi.hatenablog.com/</blog_url>
  <categories>
    <anon>ABCのF問題</anon>
    <anon>ABC本番で敗北した問題</anon>
    <anon>動的計画法</anon>
    <anon>dpテーブルの次元を落とす</anon>
  </categories>
  <description>↓問題のページ↓ F - Diversity 動的計画法を利用するのだが、本番当時の自分ではまず見えてこない（しかし説明を受ければ理解できない要素は何一つない）手法を使う必要があったため、同様の問題に出くわした際にしっかり討伐できるよう本記事で固めておく。 まずは本問の解法の本筋を記す。問われているのは「最適となるように購入した時の満足度」のみであり、どの色の商品を購入したのかは全くもって不要な情報であるため、連想配列を使うなどして登場する商品を色で分類しておき、色\(i\)の商品が\(A_i\)個存在するものとし、それらの価格と効用を\((P_0, U_0), (P_1, U_1), \do…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fjunkobayashi.hatenablog.com%2Fentry%2F2024%2F12%2F10%2F222313&quot; title=&quot;ABC383 F - Diversity - JunKobayashi&amp;#39;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>2024-12-10 22:23:13</published>
  <title>ABC383 F - Diversity</title>
  <type>rich</type>
  <url>https://junkobayashi.hatenablog.com/entry/2024/12/10/222313</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
