title: Adding specified masked areas of a pixel grid together. Does the result completely mask a certain other area?
body: <p>Given a grid of pixels and a list of certain areas on the grid, how do you find if all those areas in the list, when combined, completely cover a certain area of the grid?</p>
  
  <p>I have an image, which we can think of as a grid of pixels. Certain rectangular parts of the image have a mask applied by us. We have a list of the location/sizes of these masks. We would like to know if adding all the masked areas in our list together would completely mask a certain other area on the image.</p>
  
  <p>Is there a good algorithm or data structure that is suited to help solve this?</p>