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 1280. Topological Sorting

Why is it so hard?
Posted by sloboz 29 Jul 2004 15:01
We retain position of each element of the order and then we verify for each edge p1-p2 if pos[p1] > pos[p2]...
We just need all edges so 100,000 * 2 * 2 (2 shorts for node id) = 400K