<?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>競プロ有名問題</anon>
    <anon>累積和</anon>
  </categories>
  <description>公式解説を読むと「有名問題です」の一言があり、早急に完璧な理解が求められていると判断したため記載する。 問題のページ ＜問題概要＞ 長さ\(N\)の整数列\(C\)が与えられる。\(C\)の項を並び替えて得られる数列のうち任意の一つを\(D\)と表す時、\[S=\sum_{i=1}^{N-1} |D_i - D_{i+1}|\]の最大値を求めよ。 ＜制約＞ \(2 \leq N \leq 10^6\) \(1 \leq C_i \leq 10^9\) ＜解法＞ ※以後、「広義単調増加」「広義単調減少」をそれぞれ「単調増加」「単調減少」と記載する。また、「整数列\(U\)の第\(x\)項から第\…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fjunkobayashi.hatenablog.com%2Fentry%2F2026%2F10%2F30%2F050604&quot; title=&quot;AWC0188 E - 展示ブースの配置 - 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>2026-10-30 05:06:04</published>
  <title>AWC0188 E - 展示ブースの配置</title>
  <type>rich</type>
  <url>https://junkobayashi.hatenablog.com/entry/2026/10/30/050604</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
