akasakaR's blog

By akasakaR, history, 7 months ago, In English

Hello codeforces, I need help, I have this 258568779 for 21D - Traveling Graph, which as you can see it causes MLE with 65 use of memory, I changed every long long to int, reduced MXN to 16, and minimized the use of arrays, but still it causes MLE, can someone help please?

Thanks

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

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

you're getting mle because of heap overflow in your dfs, check your base condition. your cmask can be negative and it will keep on decreasing and recursion will never end causing heap overflow.