3. (40 points) Let integers $m, n$ satisfy $m \geqslant n$ and $m^{3}+n^{3}+1=4 m n$. Find the maximum value of $m-n$.

保留了原文的换行和格式，如上所示。
3. Let $s=m+n, p=mn$. Then $m^{3}+n^{3}=(m+n)^{3}-3m^{2}n-3mn^{2}$ $=s^{3}-3ps$.
From $s^{3}-3ps+1=4p$, we get $p=\frac{s^{3}+1}{3s+4}$.
Since $m, n$ are integers, 27p must also be an integer, and
$27p=9s^{2}-12s+16-\frac{37}{3s+4}$.
Therefore, $3s+4$ must divide 37.
Thus, $3s+4 = \pm 1$ or $\pm 37$.
If $3s+4=-1$ or -37, then $s$ is not an integer;
If $3s+4=37$, then $s=11$ and $p=36$, but there are no integers $m, n$;
If $3s+4=1$, then $s=-1$ and $p=0$.
Thus, $m=0, n=-1$.
Therefore, the maximum value of $m-n$ is 1.