E. Reachability from the Capital

Правка en1, от Doritos4, 2018-08-20 21:21:04

I'm getting wa31 for this problem ( my submission ).

First, I find all vertices that can be reached from the capital. Then, I look at all vertices which have indegree equal to 0. These vertices must have an edge directly connecting them to the capital, so I do that. Now, if unvisited vertices remain, they must form a cycle. So, I visit these vertices.

Please help

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en4 Английский Doritos4 2018-08-21 15:31:40 34 Tiny change: 'lease help' -> 'lease help\n\nEdit : I'm getting wa32 now:('
en3 Английский Doritos4 2018-08-21 08:43:59 42
en2 Английский Doritos4 2018-08-20 21:22:40 75
en1 Английский Doritos4 2018-08-20 21:21:04 511 Initial revision (published)