3. Given the function $f(x)=x^{2}-2 x+3$ has the maximum and minimum values of 3 and 2, respectively, on the interval $[0, a]$, then the range of the real number $a$ is
A. $(0,1]$
B. $(0,2]$
C. $(1,2]$
D. $[1,2]$
3. $\mathrm{D}$ prompt, can consider the graph of $f(x)=x^{2}-2 x+3$ in combination.