Cover Them All!

I can think of a solution with 2D BIT but it will give a TLE. Please suggest some approach.