Example 1 Given two sets of real numbers $A=\left\{a_{1}, a_{2}, \cdots, a_{100}\right\}$ and $B=\left\{b_{1}, b_{2}, \cdots, b_{50}\right\}$. If the mapping $f$ from $A$ to $B$ makes each element in $B$ have a preimage, and $f\left(a_{1}\right) \leqslant f\left(a_{2}\right) \leqslant \cdots \leqslant f\left(a_{100}\right)$, then the number of such mappings is ( ).
(A) $\mathrm{C}_{100}^{50}$
(B) $C_{98}^{48}$
(C) $\mathrm{C}_{1100}^{49}$
(D) $\mathrm{C}_{99}^{49}$
Solution: Let $b_{1}, b_{2}, \cdots, b_{50}$ be arranged in ascending order as $c_{1}<c_{2}<\cdots<c_{50}$ (since the elements of the set are distinct, there are no equal cases).

Divide the elements $a_{1}, a_{2}, \cdots, a_{100}$ of $A$ into 50 groups, each corresponding to the elements $c_{1}, c_{2}, \cdots, c_{50}$ of $B$. Here, we use $a_{1} a_{2} a_{3} c_{1} a_{4} a_{5} c_{2} \cdots$ to represent
$$
\begin{array}{l}
f\left(a_{1}\right)=f\left(a_{2}\right)=f\left(a_{3}\right)=c_{1}, \\
f\left(a_{4}\right)=f\left(a_{5}\right)=c_{2}, \\
\ldots \ldots .
\end{array}
$$

Considering $f\left(a_{1}\right) \leqslant f\left(a_{2}\right) \leqslant \cdots \leqslant f\left(a_{100}\right)$, it is easy to see that $f\left(a_{100}\right)=c_{50}$. This means that $c_{50}$ can only be written to the right of $a_{100}$, so we only need to choose 49 positions from the 99 spaces marked with “$\square$” in
$$
a_{1} \square a_{2} \square a_{3} \square \cdots \square a_{98} \square a_{99} \square a_{100} c_{50}
$$

and fill them in with $c_{1}, c_{2}, \cdots, c_{49}$ in order from left to right. Therefore, the number of mappings that satisfy the problem's requirements is $C_{99}^{49}$. Thus, the correct choice is (D).