TLE on CSES Graph Question Labyrinth

Правка en2, от osource, 2020-10-22 20:22:44

Hello,

I was solving CSES problemset and am stuck in this question — Question My code — Code

I am getting TLE on 4 test cases. I'm not able to figure out why as I have used standard BFS and therefore the time complexity should be O(m*n). Can someone help me in this?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский osource 2020-10-22 20:22:44 8
en1 Английский osource 2020-10-22 20:21:46 384 Initial revision (published)