Runtime error while runs on SPOJ

i have submitted the solution to problem LITE on SPOJ. it accepted.but to the similar problem on codechef FLIPPING COIN problem it gives me SIGSEGV runtime error.I can’t point out the problem.even i have increases the size of array to 100000*5 to not go out of bound but it seems no improvement.does the larger size matters i.e. 1000000 of an array to cause SIGSEGV error???


I solved the flipping coin problem using segment tree with lazy propagation.
I read about it here .He explained the segment trees and lazy propagation well.
U can see my solution there.

1 Like

@saikrishna173 dude solution to this problem are not visible to public, no one can see your solution :frowning:

1 Like

@argonaut Hmm… Still u can try to solve it after reading about segment trees in that link.

anyne help please

1 Like