\(N=\left(\left|x-1\right|+\left|2020-x\right|\right)+\left(\left|x-2\right|+\left|2019-x\right|\right)+...+\left(\left|x-1010\right|+\left|1011-x\right|\right)\\ N\ge\left|x-1+2020-x\right|+\left|x-2+2019-x\right|+...+\left|x-1010+1011-x\right|\\ N\ge2019+2017+...+1=\dfrac{\left(2019+1\right)\left[\left(2019-1\right):2+1\right]}{2}=1020100\\ N_{min}=1020100\Leftrightarrow\left\{{}\begin{matrix}\left(x-1\right)\left(2020-x\right)\ge0\\...\\\left(x-1010\right)\left(1011-x\right)\ge0\end{matrix}\right.\Leftrightarrow\left\{{}\begin{matrix}1\le x\le2020\\...\\1010\le x\le1011\end{matrix}\right.\Leftrightarrow1010\le x\le1011\)