Closed GoogleCodeExporter closed 9 years ago
Добавил в папку вариант с матрицей.
Называется DFS_matrix.cpp :)
Original comment by iakovenk...@gmail.com
on 21 Apr 2013 at 7:00
Запускаю Ваше решение. Получаю вывод:
# 1 open time: 1 close time: 26 No parent
# 2 open time: 3 close time: 20 parent: 4
# 3 open time: 7 close time: 10 parent: 18
# 4 open time: 2 close time: 25 parent: 1
# 5 open time: 0 close time: 0 No parent
# 6 open time: 15 close time: 16 parent: 13
# 7 open time: 13 close time: 18 parent: 20
# 8 open time: 4 close time: 5 parent: 2
# 9 open time: 0 close time: 0 No parent
# 10 open time: 0 close time: 0 No parent
# 11 open time: 8 close time: 9 parent: 3
# 12 open time: 0 close time: 0 No parent
# 13 open time: 14 close time: 17 parent: 7
# 14 open time: 0 close time: 0 No parent
# 15 open time: 21 close time: 24 parent: 4
# 16 open time: 0 close time: 0 No parent
# 17 open time: 22 close time: 23 parent: 15
# 18 open time: 6 close time: 11 parent: 2
# 19 open time: 0 close time: 0 No parent
# 20 open time: 12 close time: 19 parent: 2
Вершины 5, 9, 19, 12 и др у Вас не открыты. Более
того, у них стоят нелогичные времена
открытия и закрытия: 0 и 0 соответственно.
Почитайте в Кормене внимательно, как мы
определяем BFS, а как - DFS.
Решение не принято.
Original comment by aivyu...@gmail.com
on 28 Apr 2013 at 7:21
Original comment by iakovenk...@gmail.com
on 29 Apr 2013 at 10:40
Original comment by iakovenk...@gmail.com
on 29 Apr 2013 at 5:15
Решение принято.
Original comment by aivyu...@gmail.com
on 10 May 2013 at 8:19
Original issue reported on code.google.com by
iakovenk...@gmail.com
on 21 Apr 2013 at 7:22