ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1022. Genealogical Tree

O(V+E) algorithm
Posted by stupidjohn 22 Jan 2011 16:28
 DFS the graph, the earlier leave the vertex,the later it shows in the array
Re: O(V+E) algorithm
Posted by Luka Bulatovic 17 Aug 2011 17:56
DFS doesn't work here..
Re: O(V+E) algorithm
Posted by Avitella 11 Jun 2012 19:45
It's work. Topological sorting this graph(whith dfs), and write answer