4. If $a+2 b+3 c=12$, and $a^{2}+b^{2}+c^{2}$ $=a b+b c+c a$, then $a+b^{2}+c^{3}=(\quad)$.
(A) 12
(B) 14
(C) 16
(D) 18
4.B.
$$
\begin{array}{l}
\text { From } a^{2}+b^{2}+c^{2}=a b+b c+c a \text {, we get } \\
(a-b)^{2}+(b-c)^{2}+(c-a)^{2}=0 \\
\Rightarrow a=b=c \text {. }
\end{array}
$$