mkmeden's blog

By mkmeden, history, 4 months ago, In English

Can anyone help me why i am getting TLE in this code at the 10th TC.

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

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

Your BFS goes to one cell many times. You should mark a cell as used when you add it to queue.