Codeforces Round 1133 (Div. 1, Div. 2) is coming soon! Register here. ×

Ayushman_123's blog

By Ayushman_123, history, 5 years ago, In English

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.me/contest/843/submission/131610110 https://codeforces.me/problemset/submission/884/131576407 Thanks

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
5 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

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

»
5 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

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.