Number of paths between 2 vertices in a directed graph

Правка en1, от IDorando, 2022-08-09 13:20:48

Hi Codeforces! There is a problem where it asks you to find the the number of paths between 2 vertices in a directed graph. There are no cycles and you are not allowed to visit the same node multiple times. I have seen some solutions in O(n!) and O(n ^ 2) but I need something more efficient since the number of nodes N is 100000 and the number of edges is 300000. I would really appreciate if you could give me some ideas!

Теги question, number of ways, directed graph

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский IDorando 2022-08-09 13:20:48 480 Initial revision (published)