CSES Labryinth TLE?

Правка en2, от Forrest_Gump, 2020-11-26 17:22:04

I have commented the code at places. I can't understand why the code gives TLE. 1 test case gives TLE.I have tried to optimise it as much as I could but still TLE. Help would be appreciated. I have used breadth first search to solve the problem.The problem

Also what would be worst case complexity?

Code

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский Forrest_Gump 2020-11-26 17:22:04 23 Tiny change: 'ives TLE. I have tri' -> 'ives TLE. 1 test case gives TLE.I have tri'
en1 Английский Forrest_Gump 2020-11-26 17:21:05 2133 Initial revision (published)