Need Help TLE in only 1 subtask CSES Graph Problem. C++

Правка en1, от Vedkribhu, 2020-07-13 16:00:28

I was doing this graph problem from CSES link. I am getting TLE in only one sub task. I am new with c++, can you take a quick look, why it may fail for big sub task. Algorithm is just a simple BFS. My Code.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Vedkribhu 2020-07-13 16:00:28 335 Initial revision (published)