Let positive integers $a_{1}, a_{2}, \cdots, a_{31}, b_{1}, b_{2}$, $\cdots, b_{31}$ satisfy
$$
\begin{array}{l}
\text { (1) } a_{1}<a_{2}<\cdots<a_{31} \leqslant 2015, \\
b_{1}<b_{2}<\cdots<b_{31} \leqslant 2015 ;
\end{array}
$$
$$
\text { (2) } a_{1}+a_{2}+\cdots+a_{31}=b_{1}+b_{2}+\cdots+b_{31} \text {. }
$$

Find the maximum value of $S=\sum_{i=1}^{31}\left|a_{i}-b_{i}\right|$.
【Detailed Estimation】It is known that, $a_{31} \leqslant 2015, a_{30} \leqslant 2014, \cdots \cdots$
Thus, for all $1 \leqslant i \leqslant 31$, we have $a_{i} \leqslant 1984+i$.
Similarly, $b_{i} \leqslant 1984+i$.
Also, $a_{1} \geqslant 1, a_{2} \geqslant 2, \cdots \cdots$
Thus, for all $1 \leqslant i \leqslant 31$, we have $a_{i} \geqslant i$.
Similarly, $b_{i} \geqslant i$.
Furthermore, $a_{i+1} \geqslant a_{i}+1$,
$a_{i+2} \geqslant a_{i+1}+1 \geqslant a_{i}+2, \cdots \cdots$.
Thus, for all $1 \leqslant i < j$. Then
$$
\begin{array}{l}
\left(a_{i}-b_{i}\right)+\left(b_{j}-a_{j}\right)=a_{i}-\left(b_{i}-b_{j}\right)-a_{j} \\
\leqslant(1984+i)-(i-j)-j=1984 . \\
\text { Hence } \frac{31 A}{240} \leqslant 1984 \\
\Rightarrow A \leqslant 64 \times 240=15360 \\
\Rightarrow S=2 A \leqslant 30720 .
\end{array}
$$

Finally, starting from the condition for equality, we can take
$$
p=15, q=16 \text {. }
$$

Also note that,
$$
15360=1024 \times 15=960 \times 16 \text {. }
$$

We can construct
$$
\begin{aligned}
& \left(a_{1}, a_{2}, \cdots, a_{31}\right) \\
& =(1,2, \cdots, 15,2000,2001, \cdots, 2015), \\
& \left(b_{1}, b_{2}, \cdots, b_{31}\right)=(1025,1026, \cdots, 1055), \\
& \text { at this time, } S=1024 \times 15+960 \times 16=30720, \\
\text { and } & a_{1}+a_{2}+\cdots+a_{31} \\
& =b_{1}+b_{2}+\cdots+b_{31}=32240,
\end{aligned}
$$

which meets the requirements.
In summary, the maximum value of $S$ is 30720.