4. Let $x_{1}, x_{2}, x_{3}, \cdots, x_{9}$ be positive integers, and $x_{1}<x_{2}<\cdots<x_{9}, x_{1}+x_{2}+\cdots+x_{9}=220$. Then, when $x_{1}+x_{2}+\cdots+x_{5}$ is maximized, the minimum value of $x_{9}-x_{1}$ is
A. 8
B. 9
C. 10
D. 11
4. B $\quad x_{9} \geqslant x_{8}+1 \geqslant x_{7}+2 \geqslant \cdots \geqslant x_{1}+8$, thus $x_{9} \geqslant x_{1}+8, x_{9}-x_{1} \geqslant 8$, if the equality holds, $x_{1}$, $x_{2}, \cdots, x_{9}$ form an arithmetic sequence with a common difference of 1, and their sum is 220, i.e., $9 x_{5}=220, x_{5}$ is not an integer, so it is discarded; thus $x_{9}-x_{1} \geqslant 9$, taking $x_{1}=20, x_{2}=21, x_{3}=22, x_{4}=23, x_{5}=24, x_{6}=26, x_{7}=27, x_{8}=28, x_{9}=29$ gives $\sum_{i=1}^{9} x_{i}=$ 220, and $x_{9}-x_{1}=9$.