10. (20 points) Given real numbers
$$
x_{i} \in[-6,10](i=1,2, \cdots, 10), \sum_{i=1}^{10} x_{i}=50 \text {. }
$$

Find the maximum value of $\sum_{i=1}^{10} x_{i}^{2}$, and the conditions that should be satisfied when the maximum value is achieved.