Help in dfs problem Kefa and Park

Revision en2, by kanisht_09, 2020-10-01 23:23:21

I am unable to figure out which test case I m missing. Need help although I have solved it using bfs but wanted to master dfs as well.I am a beginner in graphs. Thanks in advance :) .

https://mirror.codeforces.com/contest/580/submission/94433974

given above is the submission link .

Tags #dfs and similar, #help

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English kanisht_09 2020-10-01 23:23:21 13
en1 English kanisht_09 2020-10-01 23:22:14 331 Initial revision (published)