1. Let $M=x+\frac{y z-x^{2}}{x^{2}+y^{2}+z^{2}}$ (where $x, y, z$ are distinct real numbers). If $x$ is swapped with $y$ or $z$, the value of $M$ remains unchanged. When $x+y+z=1$, the value of $M$ is ( ).
(A) positive
(B) zero
(C) negative
(D) cannot be determined
$-1 . B$.
From the problem, we have
$$
\begin{array}{l}
M=x+\frac{y z-x^{2}}{x^{2}+y^{2}+z^{2}}=y+\frac{x z-y^{2}}{y^{2}+x^{2}+z^{2}} \\
=z+\frac{y x-z^{2}}{z^{2}+y^{2}+x^{2}} .
\end{array}
$$

Then $(x-y)\left(x^{2}+y^{2}+z^{2}\right)$
$$
\begin{array}{l}
=z(x-y)+\left(x^{2}-y^{2}\right), \\
(y-z)\left(x^{2}+y^{2}+z^{2}\right) \\
=x(y-z)+\left(y^{2}-z^{2}\right), \\
(z-x)\left(x^{2}+y^{2}+z^{2}\right) \\
=y(z-x)+\left(z^{2}-x^{2}\right) .
\end{array}
$$

Since $x, y, z$ are distinct real numbers, and $x+$ $y+z=1$, we have
$$
x^{2}+y^{2}+z^{2}=x+y+z=1 \text {, }
$$

which means $\square$
$$
(x+y+z)^{2}-\left(x^{2}+y^{2}+z^{2}\right)=0 .
$$

Therefore, $x y+y z+z x=0$.
Thus, $M=x+\frac{y z-x^{2}}{x^{2}+y^{2}+z^{2}}=x+\frac{y z-x^{2}}{x+y+z}$
$$
=\frac{x y+y z+z x}{x+y+z}=0 .
$$