getting WA need help (lighoj1390 - Weight Comparison) (Category: Cycles, Topological Sorting, Strongly Connected Component)

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 !!!