11.5. In an $N \times N$ table, all natural numbers from 1 to $N^{2}$ are arranged. A number is called large if it is the largest in its row, and small if it is the smallest in its column (thus, a number can be both large and small at the same time, or it can be neither). Find the smallest possible difference between the sum of all large numbers and the sum of all small numbers. (S. Tokarev)
Answer: $\frac{N(N-1)(2 N+5)}{6}$.

Solution: Note that the number $N^{2}$ is large, and 1 is small, their difference is $N^{2}-1$. Let's delete the row containing $N^{2}$ and the column containing 1. Then, if $A$ and $B$ are the largest and smallest of the remaining $(N-1)^{2}$ numbers, $A-B \geqslant(N-1)^{2}-1$. At the same time, $A$ is not greater than the largest number in its row (in the original table), and $B$ is not less than the smallest number in its column, so the difference between these largest and smallest numbers is also not less than $(N-1)^{2}-1$. Again, delete the row containing $A$ and the column containing $B$, and repeat the reasoning.

Continuing this way, we get that the difference $S$ of interest is not less than $N^{2}-1+(N-1)^{2}-1+\ldots+1^{2}-1$. Using the formula for the sum of the squares of the first $N$ natural numbers, we get $S \geqslant N(N-1)(2 N+5) / 6$.

It remains to prove that this estimate is achievable. We will construct the corresponding example by induction on $N$. The base case for $N=1$ is obvious. For the inductive step, consider (already constructed) an example of a $(N-1) \times(N-1)$ table and increase all the numbers in it by $N-1$ (the numbers become from $N$ to $N(N-1)$, and the difference $S$ does not change). Extend this table with a new row and a new column; place the numbers $N^{2}-N+1, N^{2}-N+2, \ldots, N^{2}$ in the new row, and the numbers $1,2, \ldots, N-1$ in the remaining cells of the new column. It is easy to see that the numbers that were large and small in the previous table remain so, and a large number $N^{2}$ and a small number 1 have been added. Thus, $S$ has increased by $N^{2}-1$, as required.

Comment: It is only proven that $S \geqslant N(N-1)(2 N+5) / 6-5$ points.

An example for $S=N(N-1)(2 N+5) / 6-2$ points has been constructed.

The answer is expressed through the sum of squares - no points should be deducted.