Question 106
The Numbers $1, 2, \ldots, 10000$ Placed into the cells of a square grid $100 \times 100$ (each number appears to every two numbers which difference) $1$ Are placed into two cells sharing a common side. Consider the $5000$ Pairs of cells that differ by $5000$. for each pair, calculate the distance between the centers of its cells. Let $S$ Be the minimum of these distances. Find the maximum possible value of $S$. in square cells $100 \times 100$ Set the numbers $1, 2, \ldots, 10000$, each - once; while the numbers differing in $1$are recorded in the cells adjacent to the side. After that, the distances between the centers of each two cells were calculated, the numbers in which differ exactly by $5000$. Let him go $S$ - the minimum of these distances. What is the greatest importance $S$?