Why is this giving the RE(SIGSEGV) error please help!

https://www.codechef.com/viewsolution/38095045