6. In the coordinate plane, there are two regions $M$ and $N$. $M$ is determined by the inequalities $y \geqslant 0, y \leqslant x$ and $y \leqslant 2-x$, and $N$ is a region that varies with $t$, determined by the inequality $t \leqslant x \leqslant t+1$, where the range of $t$ is $0 \leqslant t \leqslant 1$. Let the common area of $M$ and $N$ be the function $f(t)$, then $f(t)$ is
A. $-t^{2}+t+\frac{1}{2}$
B. $-2 t^{2}+2 t$
C. $1-\frac{1}{2} t^{2}$
D. $\frac{1}{2}(t-2)^{2}$
Answer
As shown in the figure, $A(1,1), B(2,0)$.
$$
f(t)=1-\frac{1}{2} t^{2}-\frac{1}{2}(1-t)^{2}=-t^{2}+t+\frac{1}{2} \text {, }
$$

Therefore, the answer is $A$.