<?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>有理数mod</anon>
    <anon>期待値DP</anon>
  </categories>
  <description>＜問題のページ＞ ABC412 F - Socks 4 ※特に断らない限り、0-indexedで記載する。 ＜問題概要＞ \(0,1,\dotsc,N - 1\)と番号が付けられた\(N\)色の靴下があり、色が\(i\)番である靴下は\(A_i\)枚存在する。初期状態で、これらとは別に色が\(C\)番である靴下を1枚だけ持っており、終了条件を満たすまで以下の操作を繰り返す。 操作内容：タンスの中から1枚の靴下を一様ランダムに取り出し、手元の靴下と同じ色であれば終了する。異なる色であれば、手元の靴下2枚のうち1枚を任意に選択して手元に残し、もう一方をタンスの中に戻す。ただし、終了条件を満たすまで…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fjunkobayashi.hatenablog.com%2Fentry%2F2025%2F07%2F01%2F013123&quot; title=&quot;ABC412 F - Socks 4 - 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>2025-07-01 01:31:23</published>
  <title>ABC412 F - Socks 4</title>
  <type>rich</type>
  <url>https://junkobayashi.hatenablog.com/entry/2025/07/01/013123</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
