Help with the problem: Is it flower?

Revision en1, by Vasillia, 2023-05-10 19:08:27

This is my solution for a problem F Is it flower? from a Div 3 codeforces round 863. https://codeforces.me/contest/1811/submission/205309461

I dont realy understand why do i get TLE. I think my bfs algorithm passes through every node of the graph only once which i think should not get TLE. Can someone tell me why is this program too slow?

Tags graphs, problem, time exceeded

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Vasillia 2023-05-10 19:08:27 381 Initial revision (published)