You are given a 40x40 grid. Each point of the grid is either 0 or 1. You are also given an infinite amount of 1x40 rectangular slabs.
How to find out the minimum number of slabs required to cover all the points which have a value 1?
NOTE: The 1x40 slabs can overlap with each other.