ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 1022. Генеалогическое дерево

VladG The right idea [5] // Задача 1022. Генеалогическое дерево 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.
compiler Re: The right idea [1] // Задача 1022. Генеалогическое дерево 27 апр 2005 21:24
Actually I just sorted twice(one ascending and another one descending) and got AC.
Akshin Salimov Re: The right idea // Задача 1022. Генеалогическое дерево 27 апр 2005 21:50
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
Vitaliy_Ivashchenko Re: The right idea [1] // Задача 1022. Генеалогическое дерево 28 авг 2007 03:37
VladG is right. It's the topological sort problem.

See Cormen, Leiserson, Rivest, Stein "Introduction to algorithms" -> Elementary algorithms for graphs -> Topological sort
№Ⅰ——YDW Re: The right idea // Задача 1022. Генеалогическое дерево 28 апр 2009 11:42
In favor of
The idea doesn't seem to be so clear.