SPOJ CSQUARE Giving TLE with trivial algorithm
<p>Please help me with the steps to solve this programming problem :  <a href="http://www.spoj.pl/SPOJ/problems/CSQUARE/" rel="nofollow">http://www.spoj.pl/SPOJ/problems/CSQUARE/</a>   Trivial algorithm gives TLE</p>
