RE in Bitmap submission SPOJ

I was submitting the solution to BITMAP(SPOJ.com - Problem BITMAP) on SPOJ. However I am getting RE and unable to resolve it.
Here’s my solution-Online Compiler and IDE - GeeksforGeeks
Can anyone please help