RE in Bitmap submission SPOJ

I was submitting the solution to BITMAP(https://www.spoj.com/problems/BITMAP/) on SPOJ. However I am getting RE and unable to resolve it.
Here’s my solution-https://ide.geeksforgeeks.org/bhe4YFVGfl
Can anyone please help