G3.2 Let $x_{1}, x_{2}, \ldots, x_{10}$ be non-zero integers satisfying $-1 \leq x_{i} \leq 2$ for $i=1,2, \ldots, 10$.
If $x_{1}+x_{2}+\ldots+x_{10}=11$, find the maximum possible value for $x_{1}^{2}+x_{2}^{2}+\cdots x_{10}^{2}$.
In order to maximize $x_{1}^{2}+x_{2}^{2}+\cdots x_{10}^{2}$, the number of " 2 " appeared in $x_{1}, x_{2}, \ldots, x_{10}$ must be as many as possible and the remaining numbers should be " -1 ".
Let the number of " 2 " be $n$ and the number of " -1 " be $10-n$.
$$
\begin{array}{l}
2 n-1 \times(10-n)=11 \\
\Rightarrow n=7
\end{array}
$$
$$
\text { Maximum }=2^{2}+2^{2}+2^{2}+2^{2}+2^{2}+2^{2}+2^{2}+1+1+1=31
$$