|
|
вернуться в форумThe right idea Послано VladG 24 окт 2002 21:22 Nice problem! To solve it your needto use the topological sort on the graph (DAG). It can be done with DFS algorithm. Re: The right idea Actually I just sorted twice(one ascending and another one descending) and got AC. Re: The right idea Your(compiler) idea is interesting, but not clear to me. Can you tell me your idea in details plz? You can also make this via e-mail: akshinioi@yahoo.com Edited by author 27.04.2005 21:52 Re: The right idea VladG is right. It's the topological sort problem. See Cormen, Leiserson, Rivest, Stein "Introduction to algorithms" -> Elementary algorithms for graphs -> Topological sort Re: The right idea In favor of Re: The right idea Послано dxtdxt 8 май 2010 20:07 The idea doesn't seem to be so clear. |
|
|