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 1742. Team building

how to get ac in 0.031 sec?
Posted by muhammad 13 Feb 2011 11:09
i just found no of storngly connected components and got ac in 0.562 sec after eliminating stack overflow with pragma.

how to make it so fast as 0.031 sec and so little memory?
Re: how to get ac in 0.031 sec?
Posted by Borozdin Kirill 6 Dec 2011 18:51
You don't have to find strongly connected components. You can just sort vertices topologically and here you will find an answer :)
Re: how to get ac in 0.031 sec?
Posted by Scau_Ly 28 Aug 2012 15:33
i just keep getting stack overflow,could you please tell me how to eliminate it?
Re: how to get ac in 0.031 sec?
Posted by Mayank Pratap Singh 6 Dec 2016 15:06
But for topological sorting, graph must be DAG(directed acyclic)?