ENG
RUS
Timus 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
1040
. Airline Company
The graph can be not connected ?!
Posted by
Vladislav
4 Nov 2011 14:08
When I make my algo work for not connected graphs, i got AC.
(I changed
dfs(0)
to
for(int i=0;i<n;++i)if(!lev[i])dfs(i);
)
Re: The graph can be not connected ?!
Posted by
Sandro (USU)
5 Nov 2011 12:40
The graph is connected.
© 2000–2024
Timus Online Judge Team
. All rights reserved.