19. Let $S$ be a finite set of positive integers. After removing the largest positive integer, the arithmetic mean of the remaining elements is 32; after removing the smallest positive integer, the arithmetic mean of the remaining elements is 35; if the largest positive integer is added back, the arithmetic mean of the elements is 40. It is known that the largest positive integer in set $S$ is 72 more than the smallest positive integer. Then the arithmetic mean of all elements in set $S$ is ( ).
(A) 36.2
(B) 36.4
(C) 36.6
(D) 36.8
(E) 37
19. D.

Let set $S$ have $k$ elements, its maximum element be $x$, its minimum element be $y$, and the sum of all elements be $s$.
From the problem, we have
$$
\begin{array}{l}
\left\{\begin{array}{l}
\frac{s-x}{k-1}=32, \\
\frac{s-x-y}{k-2}=35, \\
\frac{s-y}{k-1}=40, \\
x-y=72
\end{array}\right. \\
\Rightarrow s=368, k=10
\end{array}
$$