6. 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_{10}\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. $C_{1 \ldots,}^{5,0}$
B. $C_{9.18}^{48}$
C. $C_{160}^{19}$
D. $C_{99}^{49}$
6. D Suppose $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 numerical order.

Define the mapping $f: A \rightarrow B$, such that the image of the elements in the $i$-th group under $f$ is $b,(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 to a mapping that satisfies the conditions.

Therefore, the number of mappings $f$ that satisfy the problem's requirements is equal to the number of ways to divide the set $A$ into 50 groups in numerical order. To achieve this, we only need to choose 49 gaps from the 99 gaps between $a_{1}$, $a_{2}, \cdots, a_{100}$ to place dividers, which will result in 50 groups.
Thus, the number of ways to divide the set $A$ in numerical order is $C_{99}^{49}$, and there are $C_{99}^{49}$ such mappings.