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

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