2. The function $y=x^{2}-2 x+3$ has a maximum value of 3 and a minimum value of 2 on the closed interval $[0, m]$, the range of values for $m$ is ( ).
A. $(-\infty, 2]$
B. $[0,2]$
C. $[1,2]$
D. $[1,+\infty)$
2. C. $y=(x-1)^{2}+2, x=1$ when, $y_{\text {min }}=2$. Also $y=3$, i.e., $(x-1)^{2}+2=3$, getting $x=0$ or 2.