Problem

Source: 2019 Thailand Mathematical Olympiad P7

Tags: combinatorics



Let $A=\{-2562,-2561,...,2561,2562\}$. Prove that for any bijection (1-1, onto function) $f:A\to A$, $$\sum_{k=1}^{2562}\left\lvert f(k)-f(-k)\right\rvert\text{ is maximized if and only if } f(k)f(-k)<0\text{ for any } k=1,2,...,2562.$$