<?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>CodeForces</anon>
  </categories>
  <description>解いてる時はなんとなく提出したら正解だった, という感じでした。 問題 codeforces.com 解法 右に向いてるやつを左から順番に取っていき, その後に左に向いてるやつを右から順番に取っていく, というのが最適な milking の一つです(左に向いてるやつを右から順番に取って, その後右に向いてるやつを左から順番に…でも良い)。なんでこれが最適かは解いてる時ははっきり証明できなかったので, 解説を見ました。i a[i] = 0, a[j] = 0 のとき… 明らかに j -&gt; i と取るのが最適 a[i] = 0, a[j] = 1 のとき… i, j のどちらを先にとっても同じ a…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmayokoex.hatenablog.com%2Fentry%2F2016%2F03%2F15%2F152129&quot; title=&quot;Codeforces Round #225 (Div. 2) C. Milking cows - 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-03-15 15:21:29</published>
  <title>Codeforces Round #225 (Div. 2) C. Milking cows</title>
  <type>rich</type>
  <url>https://mayokoex.hatenablog.com/entry/2016/03/15/152129</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
