Problem: Let $x_1$, $x_2$, \dots, $x_n$ be real numbers satisfying the conditions:
\begin{align*}
  |x_1 + x_2 + \dots + x_n| &= 1 \\
  |x_i| &\le \frac{n+1}{2} \qquad \text{for } i= 1,2, \dots, n
\end{align*}
Show that there exists a permutation $y_1$, $y_2$, \dots, $y_n$
of $x_1$, $x_2$, \dots, $x_n$ such that
\[ | y_1 + 2 y_2 + \dotsb + n y_n | \leq \frac {n + 1}{2}. \]

Solution: WLOG $\sum x_i = 1$ (by negating $x_i$) and $x_1 \le x_2 \le \dots \le x_n$.
Notice that
\begin{itemize}
\ii The largest possible value of the sum in question is
\[ A = x_1 + 2x_2 + 3x_3 + \dots + nx_n. \]
while the smallest value is
\[ B = nx_1 + (n-1)x_2 + \dots + x_n. \]
\ii Meanwhile, the \emph{average} value across all permutations is
\[ 1 \cdot \frac1n + 2 \cdot \frac1n + \dots + n \cdot \frac1n = \frac{n+1}{2}. \]
\end{itemize}

Now imagine we transform the sum $A$ to the sum $B$,
one step at a time, by swapping adjacent elements.
Every time we do a swap of two neighboring $u \le v$, the sum decreases by
\[ (iu + (i+1)v) - (iv + (i+1)u) = v-u \le n+1. \]

We want to prove we land in the interval
\[ I = \left[ -\frac{n+1}{2}, \frac{n+1}{2} \right] \]
at some point during this transformation.
But since $B \le \frac{n+1}{2} \le A$ (since $\frac{n+1}{2}$ was the average)
and our step sizes were at most the length of the interval $I$,
this is clear.