Please read the new rule regarding the restriction on the use of AI tools. ×

PNeed help for python recursion limit
Difference between en1 and en2, changed 16 character(s)
Hello,↵

I was solving this problem , [problem:414B] . ↵

I coded up a memoized recursive solution [submission:280651342] for the problem but I ran into recursion limit issues in python.↵

I searched for same issue in codeforces and came across this blog (https://codeforces.me/blog/entry/80158) , according to which I added bootstrap function into my code but I am still getting TLE ↵


Note that I have already accepted the bottom up dp solution and the same memoized solution in cpp. ↵

All I am asking for is if there is a way to get my solution (memoized recursion) to pass in python.↵


History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English SJ_SJ 2024-09-11 10:59:42 16
en1 English SJ_SJ 2024-09-10 21:51:47 624 Initial revision (published)