4. For which $n \geqslant 11$ can real numbers be placed in the cells of an $n \times n$ table so that the sum of the numbers in any $10 \times 10$ square is positive, and the sum of the numbers in any $11 \times 11$ square is negative?
4. Solution. Note that in a $19 \times 19$ square, the required arrangement exists: place the number 100 in the central square, and -1 in all other squares. Then it is clear that in a $10 \times 10$ square, the sum is 1, and in an $11 \times 11$ square, the sum is -20, which satisfies the conditions. It is also clear that by choosing any $n \times n$ square within the given $19 \times 19$ square for $11 \leqslant n<18$, we get an example for all $n$ from 11 to 19. Now we will show that it is impossible to arrange the numbers in a $20 \times 20$ square in the required way. Indeed, let's calculate the following numbers: the sum of the numbers in all $10 \times 10$ and $11 \times 11$ squares. Note that each number entered both sums an equal number of times. Indeed, let a cell have coordinates $(x, y)$, where $x$ and $y$ are no more than 10. Then the number of $10 \times 10$ squares, as well as $11 \times 11$ squares, containing this cell will be exactly $x y$ cells. From this, it is clear that for a $20 \times 20$ square, and therefore for all larger squares, this is impossible.