<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>baitop</author_name>
  <author_url>https://blog.hatena.ne.jp/baitop/</author_url>
  <blog_title>バイトの競プロメモ</blog_title>
  <blog_url>https://baitop.hatenadiary.jp/</blog_url>
  <categories>
    <anon>Codeforces</anon>
    <anon>最大公約数</anon>
    <anon>余り</anon>
    <anon>数学</anon>
    <anon>DP高速化</anon>
    <anon>任意の隣接要素が条件を満たせば、全体も条件を満たす</anon>
    <anon>bit</anon>
  </categories>
  <description>https://codeforces.com/contest/1593/problem/D2 問題 N要素の整数列Aと以下の操作が与えられる ・あるiについてA[i]-=Kする あるKについて上の操作を任意の回数行った後に 同じ数字が過半数を占めました 考える最大のKを求めよ Kには単調性が無いので二分探索などは難しい （倍数については単調性があるが） ここでS⊂AなるSで Sの全要素の値を全て同じに出来る条件は 任意のiについて、S[i]%Kが等しい事だと分かる しかし今回はこれを使わない（ここから考えて遠くなってしまった...） Sについて考えるのは正しくて A, Sを昇順にソートした上で…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbaitop.hatenadiary.jp%2Fentry%2F2022%2F01%2F24%2F170811&quot; title=&quot;D2. Half of Same   Codeforces Round #748 (Div. 3) - バイトの競プロメモ&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>https://cdn-ak.f.st-hatena.com/images/fotolife/b/baitop/20220124/20220124165334.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-01-24 17:08:11</published>
  <title>D2. Half of Same   Codeforces Round #748 (Div. 3)</title>
  <type>rich</type>
  <url>https://baitop.hatenadiary.jp/entry/2022/01/24/170811</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
