Example 1 Let integers $a_{1}, a_{2}, \cdots, a_{2019}$ satisfy
$1=a_{1} \leqslant a_{2} \leqslant \cdots \leqslant a_{2019}=99$.
Let $f=\left(a_{1}^{2}+a_{2}^{2}+\cdots+a_{2019}^{2}\right)-$
$\left(a_{1} a_{3}+a_{2} a_{4}+\cdots+a_{2017} a_{2019}\right)$.

Find the minimum value $f_{0}$ of $f$, and determine the number of arrays $\left(a_{1}, a_{2}, \cdots, a_{2019}\right)$ for which $f=f_{0}$. ${ }^{[1]}$
(2019, National High School Mathematics Joint Competition)
【Analysis】Write $f$ as the sum of several squares
$$
f=\frac{1}{2}\left(a_{1}^{2}+a_{2}^{2}+a_{208}^{2}+a_{209}^{2}+\sum_{i=1}^{207}\left(a_{i+2}-a_{i}\right)^{2}\right) \text {, }
$$

The latter part is the sum of squares of differences, which needs to be processed first.
By the problem statement, we know that $a_{i+2}-a_{i}(1 \leqslant i \leqslant 2017)$ are all non-negative integers. Thus,
$$
\begin{array}{l}
\left(a_{i+2}-a_{i}\right)^{2} \\
\geqslant a_{i+2}-a_{i}(i \in\{1,2, \cdots, 2017\}) .
\end{array}
$$

This allows us to cancel terms, with the equality condition being that the difference between $a_{i+2}$ and $a_{i}$ is 0 or 1.
First, we relax each term to get
$$
\begin{aligned}
f \geqslant & \geqslant \frac{1}{2}\left(a_{1}^{2}+a_{2}^{2}+a_{2018}^{2}+a_{2019}^{2}+\right. \\
& \left.\quad a_{2019}+a_{2018}-a_{2}-a_{1}\right) \\
= & \frac{1}{2}\left(a_{2}^{2}-a_{2}+a_{2018}^{2}+a_{2018}+9900\right) .
\end{aligned}
$$

Here, $a_{2}^{2}-a_{2}$ will definitely be relaxed to 0, and this is a function of $a_{2018}$. Combining the equality condition, it cannot be directly handled. At this point, we think of needing one term not to be relaxed.

From the above analysis, we know that the difference between $a_{2017}$ and $a_{2019}$ must not be 0 or 1. Thus,
$$
\begin{aligned}
f \geqslant & \frac{1}{2}\left(a_{1}^{2}+a_{2}^{2}+a_{2018}^{2}+a_{2019}^{2}+a_{2018}+\right. \\
& \left.a_{2017}-a_{2}-a_{1}+\left(a_{2019}-a_{2017}\right)^{2}\right) \\
\geqslant & \frac{1}{2}\left(99^{2}+a_{2018}^{2}+a_{2018}+a_{2017}+\left(99-a_{2017}\right)^{2}\right) .
\end{aligned}
$$

Considering $a_{2017}$ as a constant, the above expression is a quadratic function of $a_{2018}$. By $a_{2017} \leqslant a_{2018}$ and monotonicity, it can be relaxed into a quadratic function of $a_{2017}$, yielding
$$
\begin{array}{l}
f \geqslant a_{2017}^{2}-98 a_{2017}+99^{2} \\
=\left(a_{2017}-49\right)^{2}+7400 \geqslant 7400,
\end{array}
$$

with equality holding if and only if $a_{2}=1, a_{2017}=a_{2018}=49, a_{i+2}-a_{i} \in\{0,1\}(i=1,2, \cdots, 2016)$.

By the "partition method", the number of arrays $\left(a_{1}, a_{2}, \cdots, a_{2019}\right)$ that satisfy $f=f_{0}$ is $\mathrm{C}_{1 \text { final group. }}^{48}$.