<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>panda_noir</author_name>
  <author_url>https://blog.hatena.ne.jp/panda_noir/</author_url>
  <blog_title>panda noir 競プロのブログ</blog_title>
  <blog_url>https://kyopro.pandanoir.net/</blog_url>
  <categories>
  </categories>
  <description>Problem - 1269B - Codeforces 問題概要 長さNの数列A,Bを与えられる。Aの各要素にXを足し、Mで割った数列をCとする。Cを並べ替えるとBと一致するとき、Aに足すべき最小のXを求めよ。 入力 1 ≦ n ≦ 2000 1 ≦ m ≦ 109 0 ≦ a_i &lt; m 0 ≦ b_i &lt; m 解答 まずソートする。次にAの各要素にMを足した数列をAの後ろにくっつけてやる。これで考察はほとんど終わりである。 たとえば n=4 m=3 A = [0, 0, 2, 1] B = [2, 0, 1, 1] このとき、先程いったことをすると以下のようになる A' = [0, 0,…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkyopro.pandanoir.net%2Fentry%2F2020%2F05%2F04%2F155405&quot; title=&quot;1269 B. Modulo Equality - panda noir 競プロのブログ&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>2020-05-04 15:54:05</published>
  <title>1269 B. Modulo Equality</title>
  <type>rich</type>
  <url>https://kyopro.pandanoir.net/entry/2020/05/04/155405</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
