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

Автор akasakaR, история, 7 месяцев назад, По-английски

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

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

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

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.