I need a sequence $\{f_n\}$ of non-negative measurable functions on [0,1] s.t $f_n \to 0$ a.e but for all $[a,b] \subset [0,1]$ we have that
$$\lim_{n\to\infty}\int_{a}^{b}f_n(x)dx =(b-a)$$
I was trying different kinds of indicator functions and still, I can not find the adequate. This is a problem from a past Ph.D. qualifying exam in measure theory that I'm studying for. Any help would be appreciated.
Hint: Take $$f_n:= 2^{n}\sum_{k=0}^{2^n-1} 1_{[k2^{-n},k2^{-n}+4^{-n}]}$$ and consider subintervals of $[0,1]$ whose endpoints are dyadic (why does this suffice?). Also notice that the measure of the set of points where $f$ is nonzero equals $2^{-n}$.