Three, for the subset $X$ of $S=\{1,2, \cdots, n\}$, if the number of odd numbers is greater than the number of even numbers, then $X$ is called a good subset.
(1) Find the number of good subsets.
(2) Let the sum of the elements of the good subset $X$ be $f(x)$, find the sum of all $f(x)$.


(1) $n=2 k+1$ ( $k$ is a non-negative integer). In this case, the number of odd elements in $S$ is exactly one more than the number of even elements. Let $X$ be any subset of $S = \{1,2,3, \cdots, 2 k+1\}$ (including the empty set), then one and only one of $X$ and $\bar{X}(=S \backslash X)$ is "good". Therefore, the number of "good" subsets of $S$ is $\frac{S \text {’s total number of subsets}}{2} = \frac{2^{2 k+1}}{2} = 2^{2 k} = 2^{n-1}$.
If $n=2 k$ ( $k$ is a positive integer). In this case, a good subset has $i(1 \leqslant i \leqslant k)$ odd numbers and $j(0 \leqslant j<i)$ even numbers. Therefore, the number of good subsets is
$$
M=\sum_{i=1}^{k} C_{k}^{i} \sum_{j=0}^{i-1} C_{k}^{j}=\sum_{i=1}^{k} C_{k}^{k} \sum_{j=k+1-i}^{k} C_{k}^{j}=\sum_{i+j \geqslant k+1} C_{k}^{i} C_{k}^{j}=(1+x)^{k} \cdot(1+x)^{k}
$$

the sum of the coefficients of terms with degree greater than $k$ $=\sum_{t=k+1}^{2 k} C_{2 k}^{t}=\sum_{t=0}^{k-1} C_{2 k}^{t}$
$$
\begin{array}{l}
=\frac{1}{2}\left(\sum_{t=0}^{2 k} C_{2 k}^{t}-C_{2 k}^{k}\right) \\
=2^{2 k-1}-\frac{1}{2} C_{2 k}^{k} \\
=2^{n-1}-\frac{1}{2} C_{n}^{n} .
\end{array}
$$
(2) If $n=2 k+1$ ( $k$ is a non-negative integer). The number of good subsets containing an odd number $t$ is $\sum_{i=0}^{k} C_{k}^{i} \sum_{j=0}^{i} C_{k}^{k}$. Similar to (1),
$\sum_{i=0}^{k} C_{k}^{i} \sum_{j=0}^{i} C_{k}=\sum_{i+j \geqslant k} C_{k}^{i} C_{k}^{j}=(1+x)^{2 k}$ the sum of the coefficients of terms with degree greater than $k-1$ $=\sum_{j=k}^{2 k} C_{2 k}^{j}$ $=2^{2 k-1}+\frac{1}{2} C_{2 k}^{k}$.
The number of good subsets containing an even number $s$ is $\sum_{i=2}^{k} C_{k+1}^{i} \sum_{j=0}^{i-2} C_{k-1}^{k}$,
$$
\sum_{i=2}^{k} C_{k+1}^{i} \sum_{j=0}^{i-2} C_{k-1}^{k}=\sum_{i+j \geqslant k+1} C_{k+1}^{i} C_{k-1}^{j}=2^{2 k-1}-\frac{1}{2} C_{2 k}^{k} .
$$

Therefore, the required sum is
$$
\begin{array}{l}
\left(2^{2 k-1}+\frac{1}{2} C_{2 k}^{k}\right)(1+3+\cdots+(2 k+1))+ \\
\left(2^{2 k-1}-\frac{1}{2} C_{2 k}^{k}\right)(2+4+\cdots+2 k) \\
=2^{2 k-1} \cdot \frac{(2 k+1)(2 k+2)}{2}+\frac{1}{2} C_{2 k}^{k} \cdot(k+1) \\
=n(n+1) \cdot 2^{n-3}+\frac{n+1}{4} C_{n}^{\frac{n-1}{2}-1} \text {. } \\
\end{array}
$$

If $n=2 k$ ( $k$ is a positive integer). Similarly, the required sum is $n(n+1) \cdot 2^{n-3}-\frac{n}{2}\left(\frac{n}{2}+1\right) C_{n-\frac{n}{2}}^{n}-1$.