14. Let the set of numbers $P=\left\{a_{1}, a_{2}, \cdots, a_{m}\right\}$, its mean $C_{P}=\frac{a_{1}+a_{2}+\cdots+a_{m}}{m}$. Now divide $S=\{1,2, \cdots, n\}$ into two non-empty and disjoint subsets $A, B$, find the maximum value of $\left|C_{A}-C_{B}\right|$, and discuss the number of different ordered pairs $(A, B)$ when the maximum value is achieved.
Suppose $C_{A}>C_{B}$, and $\left|C_{A}\right|=k$, when fixing $k$,
then $C_{A}-C_{B}=\frac{a_{1}+a_{2}+\cdots+a_{k}}{k}-\frac{a_{k+1}+a_{k+2}+\cdots+a_{n}}{n-k}$
$=\frac{(n-k)\left(a_{1}+a_{2}+\cdots+a_{k}\right)-k\left(a_{k+1}+a_{k+2}+\cdots+a_{n}\right)}{k(n-k)}$
$\leqslant \frac{(n-k)[n+(n-1)+\cdots+(n-k+1)]-k[1+2+\cdots+(n-k)]}{k(n-k)}$
$=\frac{(n-k) \cdot \frac{k(2 n-k+1)}{2}-k \cdot \frac{(n-k)(n-k+1)}{2}}{k(n-k)}=\frac{2 n-k+1}{2}-\frac{n-k+1}{2}$
$=\frac{n}{2}$, equality holds if and only if all elements in $A$ are greater than those in $B$.
From the condition for equality, we know that when $k=1,2, \cdots, n-1$, there are $n-1$ pairs of $(A, B)$, and swapping the order of $A, B$ also satisfies the condition. Therefore, when $\left|C_{A}-C_{B}\right|$ reaches its maximum value, there are $2 n-2$ different ordered pairs $(A, B)$.