(5) Given $\cos x+\cos y=1$, then the range of $\sin x-\sin y$ is ( ).
(A) $[-1,1]$
(B) $[-2,2]$
(C) $[0, \sqrt{3}]$
(D) $[-\sqrt{3}, \sqrt{3}]$
(5) Let $\sin x - \sin y = t$, we easily get
$$
\cos x \cos y - \sin x \sin y = \frac{t^2 - 1}{2},
$$

which means
$$
\cos (x + y) = \frac{t^2 - 1}{2}.
$$

Since
$$
-1 \leq \cos (x + y) \leq 1,
$$

we have
$$
-1 \leq \frac{t^2 - 1}{2} \leq 1,
$$

solving which gives $-\sqrt{3} \leq t \leq \sqrt{3}$. Therefore, the answer is D.