How to solve this problem BAEKJOON Online Judge 8452

Revision en1, by choutii, 2017-09-12 08:29:25

https://www.acmicpc.net/problem/status/8452

the problem is

A directional graph G is given. When the length of all trunks is 1, you must process two queries.

  1. Remove one trunk.
  2. Outputs the shortest path from vertex 1 to vertex i. If there is no path, -1 is output.

|V| <= 10^3, M, Q <= 10^5

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English choutii 2017-09-12 08:29:25 359 Initial revision (published)