Proof.
From the condition $\sum_{1\leq i,j\leq n}|1-x_ix_j|=\sum_{1\leq i,j\leq n}|x_i-x_j|$, we have
$$\sum_{i=1}^n x_i = n.$$
Proof: It is example 15 in page 443,
“Problems from the book” (2008) by Titu Andreescu and Gabriel Dospinescu. Also, see the proof by Ravi B@AoPS, by applying USAMO 2000 Problem 6.
Thus, we need to prove that, for arbitrary real numbers $a_1, a_2, \cdots, a_n$, there is a real number $t$ such that
$$\sum_{i=1}^n |\sin (t - a_i)| \le \cot \frac{\pi}{2n}.$$
WLOG, assume that $0\le a_1 \le a_2 \le \cdots \le a_n \le \pi$.
(Note: $|\sin (t - a_i)| = |\sin (t - a_i + k\pi)|$ for all $k \in \mathbb{Z}$.)
We use @cats's very nice idea
(@Martin R told me this link).
Let $a_{n + k} = \pi + a_k$, $k = 1, 2, \cdots, n-1$.
We have
\begin{align*}
2\sum_{1\le i < j \le n} \sin (a_j - a_i)
&= \sum_{j=1}^{n-1} \sum_{i=1}^n \sin(a_{i+j} - a_i)\\
&\le \sum_{j=1}^{n-1} n \sin \frac{\sum\limits_{i=1}^n (a_{i+j} - a_i)}{n} \tag{1}\\
&= \sum_{j=1}^{n-1} n \sin \frac{\pi j}{n}\\
&= \frac{n}{2\sin \frac{\pi}{2n}} \sum_{j=1}^{n-1} 2\sin \frac{\pi}{2n} \sin \frac{\pi j}{n}
\\
&= \frac{n}{2\sin \frac{\pi}{2n}} \sum_{j=1}^{n-1}
\left(\cos\frac{(2j-1)\pi}{2n} - \cos\frac{(2j+1)\pi}{2n}\right)\\
&= \frac{n}{2\sin \frac{\pi}{2n}}\left(\cos\frac{\pi}{2n} - \cos\frac{(2(n-1)+1)\pi}{2n}\right)\\
&= n\cot \frac{\pi}{2n}. \tag{2}
\end{align*}
Explanation: (1)
$x\mapsto \sin x$ is concave on $[0, \pi]$.
And $a_{i+j} - a_i \in [0, \pi]$ for all $i=1, 2, \cdots, n$
and $j=1, 2, \cdots, n-1$. Apply Jensen's inequality.
Let
$$f(t) = \sum_{i=1}^n |\sin (t - a_i)|.$$
Using (2), we have
$$\sum_{i=1}^n f(a_i)
= 2 \sum_{1\le i < j \le n} \sin (a_j - a_i) \le n \cot \frac{\pi}{2n}.$$
Thus, by the Pigeonhole Principle, there exists $k$ such that
$f(a_k) \le \cot \frac{\pi}{2n}$.
We are done.