Example 1.12 A and B are playing table tennis, and the final score is $20: 20$. How many scenarios are there in which A has been leading B throughout the game?
Solution: Let the required number be $N$. The scoring situation of the match can be represented by an ordered array of length 40, $\left(x_{1}, x_{2}, \cdots, x_{40}\right)$, composed of 0s and 1s, where
According to the problem, we have
$$
\left\{\begin{array}{l}
x_{1}+x_{2}+\cdots+x_{40}=20 \\
x_{1}+x_{2}+\cdots+x_{j}<\frac{1}{2} j \quad(j=1,2, \cdots, 39) \\
x_{j}=0 \text { or } 1 \quad(j=1,2, \cdots, 40)
\end{array}\right.
$$

Therefore, $N$ is equal to the number of solutions to $(*)$, which is $C_{20}=\frac{38!}{20!19!}$.