Example 41 (12th CMO Question) Let real numbers $x_{1}, x_{2}, \cdots, x_{1997}$ satisfy the following conditions:
(1) $-\frac{1}{\sqrt{3}} \leqslant x_{i} \leqslant \sqrt{3}(i=1,2, \cdots, 1997)$;
(2) $x_{1}+x_{2}+\cdots+x_{1997}=-318 \sqrt{3}$, find the maximum value of $x_{1}^{12}+x_{2}^{12}+\cdots+x_{1997}^{12}$.
Solve for any $-\frac{1}{\sqrt{3}}<x_{i}<\sqrt{3}$, and let $x_{i}^{\prime}=m_{i}-h_{i}, x_{j}^{\prime}=m_{i}+h_{i}$, then $x_{i}+x_{j}$ remains unchanged, while $x_{i}^{\prime 12}+x_{j}^{\prime 12}=\left(m_{i}-h_{i}\right)^{12}+\left(m_{i}+h_{i}\right)^{12}=2 \sum_{i=0}^{6} C_{12}^{2} m_{i}^{12-2 t} h_{i}^{2 t}$ increases as $h_{i}$ increases. Therefore, take $h_{i}=\min \left\{m_{i}-\left(-\frac{\sqrt{3}}{3}\right), \sqrt{3}-m_{i}\right\}$, and use $x^{\prime}{ }_{i}=m_{i}-h_{i}, x^{\prime}{ }_{j}=m_{i}+h_{i}$ to replace $x_{i}$ and $x_{j}$, and the rest $x^{\prime}{ }_{k}=x_{k}(k \neq i, j)$, then $\sum_{i=1}^{1997} x^{\prime}{ }_{i}=\sum_{i=1}^{1997} x_{i}=-318 \sqrt{3}$, and $\sum_{i=1}^{1997} x_{i}{ }^{12}>\sum_{i=1}^{1997} x_{i}^{12}$. It is evident that when $\sum_{i=1}^{1997} x_{i}^{12}$ reaches its maximum value, at most one $x_{i}$ belongs to $\left(-\frac{1}{\sqrt{3}}, \sqrt{3}\right)$, and the rest of the variables take the value $-\frac{1}{\sqrt{3}}$ or $\sqrt{3}$. Suppose at this point, $u$ variables take the value $-\frac{1}{\sqrt{3}}, v$ variables take the value $\sqrt{3}, w(w=0$ or 1$)$ variables take the value $t \in\left(-\frac{1}{\sqrt{3}}, \sqrt{3}\right)$. Thus,
$$
\left\{\begin{array}{l}
-\frac{1}{\sqrt{3}} u+\sqrt{3} v+t w=-318 \sqrt{3}, \\
u+v+w=1997 .
\end{array}\right.
$$

By (2) $+\sqrt{3} \times$ (1) we get $4 v+(1+\sqrt{3} t) w=1043$,
it is clear that $1+\sqrt{3} t$ is an integer, and since $-\frac{1}{\sqrt{3}}<t<\sqrt{3}, 0<1+\sqrt{3} t<4$, hence $0<(1+\sqrt{3} t) w<4$, so $v$ and $(1+\sqrt{3} t) w$ are the quotient and remainder of 1043 divided by 4, and $1043=4 \times 260+3$, so $v=260$, $w=1, t=\frac{2}{\sqrt{3}}$, substituting into (2) gives $u=1736$, thus the maximum value of $\sum_{i=1}^{1997} x_{i}^{12}$ is $\left(-\frac{1}{\sqrt{3}}\right)^{12} \times 1736+(\sqrt{3})^{12} \times$ $260+\left(\frac{2}{\sqrt{3}}\right)^{12}=189548$