3. 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)$ that make $f=f_{0}$.
(2019, National High School Mathematics Joint Competition)
Given the conditions,
$$
2 f=a_{1}^{2}+a_{2}^{2}+a_{2018}^{2}+a_{2019}^{2}+\sum_{i=1}^{2017}\left(a_{i+2}-a_{i}\right)^{2} \text {. }
$$

Since \(a_{1}, a_{2}\) and \(a_{i+2}=a_{i} (i=1,2, \cdots, 2016)\) are all non-negative integers, we have:
$$
\begin{array}{l}
a_{1}^{2} \geqslant a_{1}, a_{2}^{2} \geqslant a_{2}, \\
\left(a_{i+2}-a_{i}\right)^{2} \geqslant a_{i+2}+a_{i} (i=1,2, \cdots, 2016) . \\
\text { Therefore, } a_{1}^{2}+a_{2}^{2}+\sum_{i=1}^{2016}\left(a_{i+2}-a_{i}\right)^{2} \\
\geqslant a_{1}+a_{2}+\sum_{i=1}^{2016}\left(a_{i+2}-a_{i}\right) \\
=a_{2017}+a_{2018} .
\end{array}
$$

From equations (1) and (2), we get:
$$
\begin{array}{l}
f \geqslant \frac{1}{2}\left(a_{2017}+\left(99-a_{2017}\right)^{2}+a_{2017}^{2}+99^{2}\right) \\
=\left(a_{2017}-49\right)^{2}+7400 \geqslant 7400 . \\
\text { Let } a_{1}=a_{2}=\cdots=a_{1920}=1, \\
a_{1900+2 k-1}=a_{1900+2 k}=k (k=1,2, \cdots, 49), \\
a_{2019}=99 .
\end{array}
$$

At this point, it is verified that all the inequalities above are equal. Thus, the minimum value of \(f\) is
$$
f_{0}=7400 \text {. }
$$

Next, consider the equality conditions of equation (3). In this case,
$$
a_{2017}=a_{2018}=49 \text {, }
$$

and all inequalities in equation (2) are equal, i.e.,
$$
\begin{array}{l}
a_{1}=a_{2}=1, \\
a_{i+2}-a_{i} \in\{0,1\} (i=1,2, \cdots, 2016) .
\end{array}
$$

Then \(1=a_{1} \leqslant a_{2} \leqslant \cdots \leqslant a_{2018}=49\), and for each \(k (1 \leqslant k \leqslant 49)\), \(a_{1}, a_{2}, \cdots, a_{2018}\) contains at least two terms equal to \(k\). It is easy to verify that this is also the necessary and sufficient condition for equation (3) to be equal.

For each \(k (1 \leqslant k \leqslant 49)\), let the number of terms in \(a_{1}, a_{2}, \cdots, a_{2018}\) that are equal to \(k\) be \(1+n_{k}\). Then \(n_{k}\) is a positive integer, and
$$
\left(1+n_{1}\right)+\left(1+n_{2}\right)+\cdots+\left(1+n_{49}\right)=2018 \text {. }
$$

That is, \(n_{1}+n_{2}+\cdots+n_{49}=1969\).
The number of positive integer solutions \((n_{1}, n_{2}, \cdots, n_{49})\) to this equation is \(\mathrm{C}_{1968}^{48}\), and each solution uniquely corresponds to an array \((a_{1}, a_{2}, \cdots, a_{2019})\) that makes equation (3) equal. Therefore, the number of arrays \((a_{1}, a_{2}, \cdots, a_{2019})\) that satisfy \(f=f_{0}\) is \(\mathrm{C}_{1968}^{48}\).