ALuca_Rd's blog

By ALuca_Rd, history, 3 years ago, In English

Given a graph with N nodes with each node numbered from 1 to N and M edges and a target vertex T. Find the number of different ways to reach target vertex T from vertex numbered 1.

2 <= N <= 2 * 10^5, M = min( 2 * 10^5, N * ( N - 1 ) / 2 )

Time limit — 5sec

Compute the answer modulo 10^9 + 7.

Full text and comments »

  • Vote: I like it
  • +12
  • Vote: I do not like it