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

Revision en1, by 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.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Vedkribhu 2020-07-13 16:00:28 335 Initial revision (published)