1. Let real numbers $a_{1}, a_{2}, \cdots, a_{40}$ satisfy $a_{1}+a_{2}+\cdots+a_{40}=0$, and for $1 \leqslant i \leqslant 40$, we have $\left|a_{i}-a_{i+1}\right| \leqslant 1\left(a_{41}=a_{1}\right)$. Let $a=a_{10}, b=a_{20}, c=a_{30}, d=a_{40}$. Find: (1) the maximum value of $a+b+c+d$; (2) the maximum value of $a b+c d$. (Provided by He Yijie)
1. (1) Agree that the subscript is understood modulo 40.

According to the condition, for any integers $k, m$, we have $a_{m+k} \geqslant a_{m}-|k|$.
$$
\begin{array}{l}
\text { Then } 0=\sum_{i=1}^{40} a_{i} \\
=\sum_{k=-4}^{5} a_{10+k}+\sum_{k=-4}^{5} a_{00+k}+\sum_{k=-4}^{5} a_{30+k}+\sum_{k=-4}^{5} a_{00+k} \\
\geqslant \sum_{k=-4}^{5}(a-|k|)+\sum_{k=-4}^{5}(b-|k|)+ \\
\sum_{k=-4}^{5}(c-|k|)+\sum_{k=-4}^{5}(d-|k|) \\
=10(a+b+c+d)-4 \times 25 \\
\Rightarrow a+b+c+d \leqslant 10 . \\
\text { Also, let } a_{1 \alpha+k}=\frac{5}{2}-|k|(0 \leqslant i \leqslant 3,-4 \leqslant k \leqslant 5),
\end{array}
$$

At this point, $a_{1}, a_{2}, \cdots, a_{40}$ satisfy the condition, and
$$
a+b+c+d=4 \times \frac{5}{2}=10 \text {. }
$$

Thus, the maximum value of $a+b+c+d$ is 10.
(2) By symmetry, assume $a b \geqslant c d$.

If $a b \leqslant 0$, then $a b+c d \leqslant 0$.
Consider the case $a b>0$.
Assume $a, b>0$ (otherwise, if $a, b \leq 0$, the result is similar).
If $a+b>10$, by the conclusion of (1), we get $c+d<0$, hence $c, d<0$.
Also, $c \geqslant b-10, d \geqslant a-10$, then
$c d \leqslant(10-b)(10-a)$.
Note that, $10<a+b \leqslant \frac{25}{2}$.
Thus, $a b+c d \leqslant a b+(10-b)(10-a)$
$$
\begin{array}{c}
=2(a-5)(b-5)+50 \\
\leqslant \frac{1}{2}(a+b-10)^{2}+50 \leqslant \frac{425}{8} .
\end{array}
$$

If $a+b \leqslant 10$, then
$$
a b+c d \leqslant 2 a b \leqslant \frac{(a+b)^{2}}{2} \leqslant 50<\frac{425}{8} \text {. }
$$
(ii) When $c d \leqslant 0$, we have
$$
a b+c d \leqslant a b \leqslant \frac{(a+b)^{2}}{4} \leqslant \frac{625}{16}<\frac{425}{8} \text {. }
$$

On one hand, from cases (i) and (ii), we get
$$
a b+c d \leqslant \frac{425}{8} \text {; }
$$

On the other hand, let
$$
\begin{array}{l}
a_{10+k}=\frac{25}{4}-|k|(-14 \leqslant k \leqslant 5), \\
a_{20+k}=\frac{25}{4}-|k|(-4 \leqslant k \leqslant 15),
\end{array}
$$

At this point, $a_{1}, a_{2}, \cdots, a_{40}$ satisfy the condition, and
$$
a b+c d=\left(\frac{25}{4}\right)^{2}+\left(-\frac{15}{4}\right)^{2}=\frac{425}{8} .
$$

Thus, the maximum value of $a b+c d$ is $\frac{425}{8}$.