1. Positive integers $x_{1}, x_{2}, \cdots, x_{n}$ satisfy $x_{1}+x_{2}+\cdots+x_{n}=$ $m$ (constant). Try to find the maximum value of $f=x_{1}^{2}+x_{2}^{2}+\cdots+x_{n}^{2}$.
( Hint: First prove that the necessary condition for $f$ to take the maximum value is $x_{1}=1$. Similarly, we get $x_{i}=1(i \neq n)$, so $f_{\text {max }}=(n-1)+(m-n+$ 1) ${ }^{2}$. )