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

Автор Foysal_Ahmmed, история, 8 лет назад, По-английски

I am getting Memory limit exceeded for this problem C. Dijkstra? But why I can not understand this. My Solution

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

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

The size of queue is getting very large during execution you can either use set like this solution and clear the entry for v line number 29 this will restrict the size of set to at max O(N) http://codeforces.me/contest/20/submission/43596615

or like this solution you can free some memory by clearing the vectors you are not going to use. http://codeforces.me/contest/20/submission/43596568