Have a look at the problem statement first, http://www.spoj.com/problems/BITMAP/ Today, I solved a very interesting problem on SPOJ. In the initial stages I used Brute Force; judging from the complexity of the algorithm I knew it wouldn’t pass. I searched for some hints on Google. …