Brainless_Loco's blog

By Brainless_Loco, history, 4 years ago, In English

I don't know why it's getting MLE. Can you please tell me the reason.

MLE submission

Problem Link: D. Solve The Maze

Thanks in advance.

  • Vote: I like it
  • +4
  • Vote: I do not like it

| Write comment?
»
4 years ago, # |
  Vote: I like it +3 Vote: I do not like it

Hint: the only place with dynamic memory allocation in your code is queue<pair<int, int>>, so check your BFS carefully to ensure that the new items are not pushed endlessly into the queue.