SIGSEGV error

why did i get the SIGSEGV error in question http://www.codechef.com/problems/DCE05
and answer is http://www.codechef.com/viewsolution/5678512