Four. (50 points) Let $A$ be a $3 \times 9$ grid, with each small cell filled with a positive integer. If the sum of all numbers in an $m \times n (1 \leqslant m \leqslant 3, 1 \leqslant n \leqslant 9)$ subgrid of $A$ is a multiple of 10, then it is called a "good rectangle"; if a $1 \times 1$ cell in $A$ is not contained in any good rectangle, then it is called a "bad cell". Find the maximum number of bad cells in $A$.
First, we prove by contradiction that there are no more than 25 bad cells in $A$.

Assume the conclusion is not true. Then, in the grid $A$, there is at most 1 cell that is not a bad cell. By the symmetry of the grid, we can assume that all cells in the first row are bad cells.

Let the numbers filled in the $i$-th column from top to bottom be $a_{i}, b_{i}, c_{i} (i=1,2, \cdots, 9)$. Define
$$
\begin{array}{l}
S_{k}=\sum_{i=1}^{k} a_{i}, \\
T_{k}=\sum_{i=1}^{k}\left(b_{i}+c_{i}\right)(k=0,1, \cdots, 9),
\end{array}
$$

where $S_{0}=T_{0}=0$.
We will prove that the three sets of numbers $S_{0}, S_{1}, \cdots, S_{9}; T_{0}, T_{1}, \cdots, T_{9}$, and $S_{0}+T_{0}, S_{1}+T_{1}, \cdots, S_{9}+T_{9}$ are all complete residue systems modulo 10.

In fact, suppose there exist $m, n (0 \leqslant m < n \leqslant 9)$ such that $S_{m} \equiv S_{n} (\bmod 10)$. Then
$$
\sum_{i=m+1}^{n} a_{i} = S_{n} - S_{m} \equiv 0 (\bmod 10),
$$

which means the cells from the $(m+1)$-th column to the $n$-th column in the first row form a good rectangle, contradicting the assumption that all cells in the first row are bad cells.
Similarly, suppose there exist $m, n (0 \leqslant m < n \leqslant 9)$ such that
$$
\begin{array}{l}
T_{m} \equiv T_{n} (\bmod 10). \\
\text{Then } \sum_{i=m+1}^{n}\left(b_{i}+c_{i}\right) = T_{n} - T_{m} \equiv 0 (\bmod 10),
\end{array}
$$

which means the cells from the $(m+1)$-th column to the $n$-th column in the second and third rows form a good rectangle.

Thus, there are at least 2 cells that are not bad cells, which is a contradiction.
Similarly, there do not exist $m, n (0 \leqslant m < n \leqslant 9)$ such that
$$
\begin{array}{l}
S_{m} + T_{m} \equiv S_{n} + T_{n} (\bmod 10). \\
\text{Hence } \sum_{k=0}^{9} S_{k} \equiv \sum_{k=0}^{9} T_{k} \equiv \sum_{k=0}^{2}\left(S_{k} + T_{k}\right) \\
\equiv 0 + 1 + \cdots + 9 \equiv 5 (\bmod 10). \\
\text{Then } \sum_{k=0}^{2}\left(S_{k} + T_{k}\right) \equiv \sum_{k=0}^{2} S_{k} + \sum_{k=0}^{2} T_{k} \\
\equiv 5 + 5 \equiv 0 (\bmod 10),
\end{array}
$$

which is a contradiction.
Therefore, the assumption is false, meaning that the number of bad cells cannot exceed 25.

Next, we construct a $3 \times 9$ grid (Table 1), and it can be verified that each cell not filled with 10 is a bad cell. In this case, there are 25 bad cells.
Table 1
\begin{tabular}{|l|l|l|l|l|l|l|l|l|}
\hline 1 & 1 & 1 & 2 & 1 & 1 & 1 & 1 & 10 \\
\hline 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
\hline 1 & 1 & 1 & 10 & 1 & 1 & 1 & 1 & 2 \\
\hline
\end{tabular}

In conclusion, the maximum number of bad cells is 25.
(Ding Longyun provided)