Inequality with condition $\sum_{1\leq i,j\leq n}|1-x_ix_j|=\sum_{1\leq i,j\leq n}|x_i-x_j|$
Let $x_1,x_2,\ldots,x_n\, (n\geq 3)$ be positive real numbers such that $$\sum_{1\leq i,j\leq n}|1-x_ix_j|=\sum_{1\leq i,j\leq n}|x_i-x_j|.$$ Prove that: for arbitrary real number $a_1,a_2,\ldots,a_n$, there is a real number $t$, such that $$\sum_{i=1}^n |\sin (t-a_i)|\leq \cot \left(\frac\pi{2\sum_{i=1}^n x_i}\right).$$
I think $\sum_{1\leq i,j\leq n}|1-x_ix_j|=\sum_{1\leq i,j\leq n}|x_i-x_j|$ is difficult to use, because it seems so surprising.
This edition gives a second and better counterexample.
As you say, the given condition on the $x_1,x_2,x_3,\cdots,x_n$ is difficult to use.
I'm afraid what you're proposing is not true. Here a counterexample for $n=3$. Because of the difficulty mentioned above the calculations are approximate but the continuity makes them very plausible.
Take $(x_1,x_2,x_3)\approx(0.1,\space 1.432,\space 0.02)$. You have with these values $$(|x_1-x_2|+|x_1-x_3|+|x_2-x_3|)-(|1-x_1x_2|+|1-x_1x_3|+|1-x_2x_3|)\approx 0.01$$ In other words $RHS-LHS\approx 0.01$ and with $x_1,x_2,x_3$ having better decimal approximation would have the equality.
Now one has $$2(x_1+x_2+x_3)\approx 3.104\\\cot\left(\dfrac{\pi}{3.104}\right)\approx 0.6251195670$$ and taking the arbitraries $(a_1,a_2,a_3)=\left(\dfrac{\pi}{2},\dfrac{\pi}{5},\dfrac{\pi}{5}\right)$ one has the function $$g(x)=|\sin(x-\dfrac{\pi}{2})|+2|\sin(x-\dfrac{\pi}{5})|\ge 0.831$$ For which, whatever $x$ ($t$ in your notation) we would have the absurdity $$0.831\le 0.625$$
A better second counterexample: $(x_1,x_2,x_3)=(0.3,\space0.07,\space 1.3157)$.
Now you have $$LHS-RHS=0.000791$$ and $\cot\left(\dfrac{\pi}{3.3714}\right)\approx 0.7429287$ which with the same $g(x)$ above gives the absurde $$0.831\le0.7429$$
►This counterexample is better than the first one because $LHS$ is closer to $RHS$◄