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

WA#2
Posted by HaaS 5 Oct 2010 20:26
I was WA#2 and now I get Ac,
because: Graph can be not connected
Re: WA#2
Posted by Nguyen Khac Tung 24 Oct 2010 13:05
I got WA#2 too,
but I thought that the graph is supposed to be not connected.

Can help me identify my errors , here's my solution :
- I reverse all the edges
- DFS from the vertex without any other vertex pointing to
- Count the depth, if depth = number of vertex -> output in reverse order
Re: WA#2
Posted by stupidjohn 22 Jan 2011 16:24
3Q,i made the same mistake,and i now get AC