why am i getting runtime SIGSEGV error ??

why am i getting runtime SIGSEGV error in my code https://www.codechef.com/viewsolution/21943034