5. 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) $\mathrm{C}_{99}^{48}$
(C) $\mathrm{C}_{100}^{49}$
(D) $\mathrm{C}_{99}^{49}$
(D)
5.【Analysis and Solution】Let's assume $b_{1}<b_{2}<\cdots<b_{50}$, and divide the elements $a_{1}, a_{2}, \cdots, a_{100}$ of $A$ into 50 non-empty groups in order. Define the mapping $f: A \rightarrow B$, such that the image of the elements in the $i$-th group under $f$ is $b_{1}(i=1,2, \cdots, 50)$. It is easy to see that such an $f$ satisfies the problem's requirements, and each such grouping corresponds one-to-one with the mappings that satisfy the conditions. Therefore, the number of mappings $f$ that satisfy the problem's requirements is equal to the number of ways to divide $A$ into 50 groups in order. The division of $A$ is equivalent to selecting 49 elements from the first 99 elements of $A$ to sequentially serve as the last elements of the first 49 groups (this ensures that each group is non-empty and corresponds one-to-one with the former), so the number of ways to divide $A$ is $\mathrm{C}_{99}^{49}$. Therefore, there are $\mathrm{C}_{99}^{49}$ such mappings, hence the answer is $\mathrm{D}$.