Example 2 Let $m, n$ be positive integers, $m<2001, n<$ 2002, and there are $2001 \times 2002$ different real numbers. Fill these numbers into the squares of a $2001 \times 2002$ chessboard so that each square contains exactly one number. If a number in a square is less than at least $m$ numbers in its column and also less than at least $n$ numbers in its row, then this square is called a "bad square". For each way of filling the numbers, find the minimum value of the number of bad squares $S$.
(2002, Vietnam Mathematical Olympiad)
Analysis: To facilitate the calculation of the number of bad cells $S$, we can examine a scenario arranged according to specific rules:

Fill the numbers $1, 2, \cdots, 2001 \times 2002$ in natural order from left to right, row by row, into the $2001 \times 2002$ chessboard (as shown below).
\begin{tabular}{cccc}
1 & 2 & $\cdots$ & 2002 \\
2003 & 2004 & $\cdots$ & 4004 \\
$\ldots$ & $\cdots$ & $\cdots$ & $\cdots$
\end{tabular}
$2000 \times 2002+1 \quad 2000 \times 2002+2 \quad \cdots 2001 \times 2002$
At this point, the number of bad cells
$S=(2001-m)(2002-n)$.
From this, we conjecture that the minimum value of $S$ is
$(2001-m)(2002-n)$.
Note that $2001$ and $2002$ are year numbers, which may be deliberately arranged by the problem setter, and do not necessarily require the use of any specific properties of $2001$ and $2002$. That is, replacing them with any positive integers $p$ and $q$ (my, contradiction).

Next, we prove: For any $p \times q (m<p, n<q)$ chessboard, $S \geqslant (p-m)(q-n)$.

We use induction on $p+q$. When $p+q=m+n+2$, $p=m+1, q=n+1$. Since the cell containing the smallest number must be a bad cell, the number of bad cells is at least $1=(p-m)(q-n)$. Assume that when $p+q=t$, the conclusion holds. Consider the case when $p+q=t+1$. By the lemma, assume there exists a column that does not contain a cell that is bad in the column but good in the row. Removing this column results in a $p$ row by $q-1$ column chessboard. Since $p+q-1=t$, this chessboard has at least $(p-m)(q-1-n)$ bad cells. Adding this column back, the original bad cells remain bad, and the bad cells in this column must also be bad (since this column does not contain a cell that is bad in the column but good in the row). There are $p-m$ bad cells in this column, so the total number of bad cells is at least
$$
\begin{aligned}
& (p-m)(q-1-n)+p-m \\
= & (p-m)(q-n) .
\end{aligned}
$$

In particular, taking $p=2001, q=2002$, the number of bad cells is at least $(2001-m)(2002-n)$.

On the other hand, filling $1, 2, \cdots, 2001 \times 2002$ in natural order from left to right, row by row, into the $2001 \times 2002$ chessboard, we have
$$
S=(2001-m)(2002-n) \text {. }
$$

In summary, the minimum value of the number of bad cells $S$ is
$(2001-m)(2002-n)$.