Chef Through Segment(RE-SIGXFSZ)

The Link Of the question:-http://www.codechef.com/problems/GERALD03
My soultion:-http://www.codechef.com/viewsolution/6984808

I dont know why am I getting this error
plz help