problem link: http://www.lightoj.com/volume_showproblem.php?problem=1390
my code: http://pastebin.com/gZmFux20
verdict : WA
My idea:
did a topo sort to find an order then ran a dfs and marked cross edges and removed them. What did i miss !!!
problem link: http://www.lightoj.com/volume_showproblem.php?problem=1390
my code: http://pastebin.com/gZmFux20
verdict : WA
My idea:
did a topo sort to find an order then ran a dfs and marked cross edges and removed them. What did i miss !!!