I am getting runtime error in my code in ZCO12001

Here is my solution : https://www.codechef.com/viewsolution/37140327

can anybody tell me why am I getting runtime error?

Oh my god! I tried this problem after you posted it and you won’t believe this! It failed just ONE test case, so irritating! https://www.codechef.com/viewsolution/37146589

Btw, I am not really sure why your solutions is getting NZEC. It looks fine to me, the only potential issue could be at line 3, you should do it like this:

count, depth, stack, tempCount, index, cIndex = [0] * 6

Actually, why are you submitting your solution in pypy 3? I think this code would work with Python 3 selected and all the brackets in the if statements removed…

I changed that line, it’s still showing runtime error. And I was submitting in pypy3 because I read somewhere that pypy3 is faster than python 3

got the solution, the problem was in my split statement :smiley:

Ahh ok, nice! My approach that eventually got accepted: https://www.codechef.com/viewsolution/37172492