SIGSEGV in STICKS problem?

Problem Code : Contest Page | CodeChef
My Solution : Solution: 67730636 | CodeChef

I know that this line is causing SIGSEGV issue


but I did took care, that the array doesn’t go out of bounds, please help me figure out where my array goes out of bounds or SIGSEGV