Блог пользователя Ayushman_123

Автор Ayushman_123, история, 3 года назад, По-английски

Please tell me why I got runtime error while solving a problem with DFS even I set recursion limit also but I don't know why I got runtime error. Check my solution please. https://codeforces.com/contest/843/submission/131610110 https://codeforces.com/problemset/submission/884/131576407 Thanks

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
3 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by Ayushman_123 (previous revision, new revision, compare).

»
3 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

You're using setrecursionlimit to increase the height of the stack but what you need is to increase the overall size of the stack, which can be easily be done using the threading module. Your modified submission in python for one of your problem. Hope this helps you.