Problem

Source: China Girls Math Olympiad 2020

Tags: maximum value, Inequality, algebra, CGMO



Let $n$ be an integer and $n \geq 2$, $x_1, x_2, \cdots , x_n$ are arbitrary real number, find the maximum value of $$2\sum_{1\leq i<j \leq n}\left \lfloor x_ix_j \right \rfloor-\left ( n-1 \right )\sum_{i=1}^{n}\left \lfloor x_i^2 \right \rfloor $$