Given directed unweighted graph. It consist of N ≤ 105 vertices. There is at most one edge from each vertex. You need to answer for two types of queries (Q ≤ 105):
- Delete an edge from vertex V. Unexisting edge won't be deleted.
- Find shortest path from U to V.
No ideas. How to solve it?