5. Let $x_{1}, x_{2}, \cdots, x_{n}$ be a sequence of integers satisfying the following conditions: (i) $-1 \leqslant x_{i} \leqslant 2$, for $i=1,2,3, \cdots, n$. (ii) $x_{1}+x_{2}+\cdots+x_{n}=19$ and (iii) $x_{1}^{2}+x_{2}^{2}+\cdots+x_{m}^{2}=99$. Let $m$ and $M$ be the minimum and maximum values of $x_{1}^{3}+x_{2}^{3}+\cdots+x_{n}^{3}$, respectively. Then the value of $\frac{M}{m}$ is
A. 4
B. 5
C. 6
D. 7
5. D Let's assume among the $n$ numbers, $-1, 0, 1, 2$ appear $p, q, r, s$ times respectively. Then we have $-p + r + 2s = 19, p + r + 4s = 99$; thus $r + 3s = 59, r + s = 40$, and $s_{\min} = 0, s_{\max} = 19$. Also, $x^3 + x^3 + \cdots + x_n^3 = -p + r + 8s = 19 + 6s$, so $\frac{M}{m} = \frac{19 + 6 \times 19}{19 + 6 \times 0} = 7$.