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 : https://www.codechef.com/JAN19B/problems/FANCY

Can anyone help me?Link to my solution is https://ideone.com/skhW0S

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

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

1 Like