Runtime error (NZEC) in FANCY

I am getting Run Time (NZEC) Error in the Codechef January Challenge 2019 question Fancy Quotes. The link to the question is :

Can anyone help me?Link to my solution is

Hmm, releasing a solution to an ongoing contest is definitely NOT going to get me banned right? :thinking:

1 Like

Same here pls help…
If i give custom input and run the code then it runs fine but not otherwise

I was facing the same problem i won’t tell you the solution but the code will pass if u can pass the code for these
4 testcases :

  1. n
  2. no
  3. not
  4. any random string