Three. (50 points) Given the set
$$
M=\{1,2, \cdots, 2020\} \text {. }
$$

Now, each number in $M$ is colored one of three colors: red, yellow, or blue, and each color is used at least once. Let
$$
\begin{aligned}
S_{1}= & \left\{(x, y, z) \in M^{3} \mid x, y, z\right. \text { are the same color, } \\
& 2020 \mid(x+y+z)\}, \\
S_{2}= & \left\{(x, y, z) \in M^{3} \mid x, y, z\right. \text { are all different colors, } \\
& 2020 \mid(x+y+z)\} .
\end{aligned}
$$

Find the minimum value of $2\left|S_{1}\right|-\left|S_{2}\right|$.
Let $T=\left\{\omega, \omega^{2}, \cdots, \omega^{n}\right\}$, where $\omega$ is an $n$-th primitive root of unity, and $\omega^{n}=1$ (with $n=2020$). Let the red set, yellow set, and blue set be $I_{1}$, $I_{2}$, and $I_{3}$, respectively. Then,
$$
\begin{array}{l}
\left|S_{1}\right|=\frac{1}{n} \sum_{x \in T}\left(\left(\sum_{j \in I_{1}} x^{j}\right)^{3}+\left(\sum_{j \in I_{2}} x^{j}\right)^{3}+\left(\sum_{j \in I_{3}} x^{j}\right)^{3}\right), \\
\left|S_{2}\right|=6 \cdot \frac{1}{n} \sum_{x \in T}\left(\left(\sum_{j \in I_{1}} x^{j}\right)\left(\sum_{j \in I_{2}} x^{j}\right)\left(\sum_{j \in I_{3}} x^{j}\right)\right).
\end{array}
$$

Let $T_{k}=\sum_{x \in I_{k}} x^{j}$ for $k=1,2,3$. Then,
$$
T_{1}+T_{2}+T_{3}=\sum_{j=1}^{n} x^{j}=\left\{\begin{array}{l}
n, \text{ if } x=1; \\
0, \text{ if } x \neq 1 \text{ and } x^{n}=1.
\end{array}\right.
$$

Thus, $2\left|S_{1}\right|-\left|S_{2}\right|$
$$
\begin{aligned}
= & \frac{2}{n} \sum_{x \in T}\left(T_{1}^{3}+T_{2}^{3}+T_{3}^{3}-3 T_{1} T_{2} T_{3}\right) \\
= & \frac{2}{n} \sum_{x \in T}\left(T_{1}+T_{2}+T_{3}\right)\left(T_{1}^{2}+T_{2}^{2}+T_{3}^{2}-\right. \\
& \left.T_{1} T_{2}-T_{1} T_{3}-T_{2} T_{3}\right) \\
= & \frac{2}{n} \cdot n\left(\left|I_{1}\right|^{2}+\left|I_{2}\right|^{2}+\left|I_{3}\right|^{2}-\left|I_{1}\right|\left|I_{2}\right|-\right. \\
& \left.\left|I_{1}\right|\left|I_{3}\right|-\left|I_{2}\right|\left|I_{3}\right|\right) \\
= & 2\left(\left|I_{1}\right|^{2}+\left|I_{2}\right|^{2}+\left|I_{3}\right|^{2}-\left|I_{1}\right|\left|I_{2}\right|-\right. \\
& \left.\left|I_{1}\right|\left|I_{3}\right|-\left|I_{2}\right|\left|I_{3}\right|\right).
\end{aligned}
$$

Given that $\left|I_{1}\right|+\left|I_{2}\right|+\left|I_{3}\right|=n \equiv 1(\bmod 3)$, we have
$$
\begin{array}{l}
\left|I_{1}\right|^{2}+\left|I_{2}\right|^{2}+\left|I_{3}\right|^{2}-\left|I_{1}\right|\left|I_{2}\right|-\left|I_{1}\right|\left|I_{3}\right|- \\
\left|I_{2}\right|\left|I_{3}\right| \geqslant 1.
\end{array}
$$

Therefore, $2\left|S_{1}\right|-\left|S_{2}\right| \geqslant 2$.
The equality holds when two of $\left|I_{1}\right|$, $\left|I_{2}\right|$, and $\left|I_{3}\right|$ are $\frac{n-1}{3}$ and one is $\frac{n+1}{3}$.