Got stuck in one testcase

Revision en1, by Cloverr_, 2020-07-26 15:13:40

I am trying to solve this 1234C - Трубы.

In the 5th test case, i am getting a max recursion limit exceeded error 88052124. I have tried setting the sys.setrecursionlimit and also tried solving it with C++ 88047895, and still getting the same issue. I tried generating a lot of random test cases locally to test it, however everytime it runs succesfully.

Can anyone suggest me what I am doing wrong or provide a example where my code will fail.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Cloverr_ 2020-07-26 15:13:40 503 Initial revision (published)