Problem

Source: Bulgaria 1982 P4

Tags: inequalities



If $x_1,x_2,\ldots,x_n$ are arbitrary numbers from the interval $[0,2]$, prove that $$\sum_{i=1}^n\sum_{j=1}^n|x_i-x_j|\le n^2$$When is the equality attained?