4. [8] Each segment with endpoints at the vertices of a regular 100-gon was painted - red if there is an even number of vertices between its endpoints, and blue otherwise (in particular, all sides of the 100-gon are red). Numbers were placed at the vertices, the sum of whose squares is 1, and on the segments - the products of the numbers at the endpoints. Then the sum of the numbers on the red segments was subtracted from the sum of the numbers on the blue segments. What is the largest number that could have been obtained?

I. Bogdanov
Answer: $1 / 2$. Solution: Let the numbers $x_{1}, \ldots, x_{100}$ be arranged in the vertices in a circle, and let $k$ be the sum of the "red" numbers, and $s$ be the "blue" ones. Then the sum of the red numbers is the sum of all monomials of the form $x_{i} x_{j}$, where $i$ and $j$ have different parity and $i<j$, and the sum of the blue numbers is the sum of all monomials of the form $x_{i} \chi_{j}$, where $i$ and $j$ have the same parity and $i<j$; in addition, $\left(x_{1}\right)^{2}+\left(x_{2}\right)^{2}+\ldots+\left(x_{100}\right)^{2}=1$. Notice now that the expression $\left(x_{1}-x_{2}+x_{3}-x_{4}+\ldots+x_{99}-x_{100}\right)^{2}$ equals $1-2 k+2 s$ and is non-negative, from which $k-s \leq 1 / 2$.

Equality is achieved when the expression in parentheses is zero, for example, when $x_{1}=x_{2}=\ldots=x_{100}=1 / 10$.