Longest Good Subsegment

I am getting runtime error can anyone help me out.
https://www.codechef.com/viewsolution/49425775
This is my code

use vector instead of array the same happened to me also,as the memory used by vector in heap and array on stack,which is limited

1 Like

thanks bro it worked

:+1: