Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

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

Автор 100mil, история, 2 года назад, По-английски

Can someone help me as to why I am getting a memory limit exceeded result in problem F of last contest question:https://codeforces.net/contest/1675/problem/F my solution:https://codeforces.net/contest/1675/submission/156068401

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

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

You're copying the temp and adj vectors many times during the dfs, that'll get you MLE

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

A small note for you:

These type of questions can be asked in the tutorial blog of that contest. Creating a new blog to ask about simple problems with your solution is disturbing for the community as all the posts appear in the homepage as long as it's active.

Don't take it personally. Thanks.