CF843D Dynamic Shortest Path
Description
You are given a weighted directed graph, consisting of $ n $ vertices and $ m $ edges. You should answer $ q $ queries of two types:
- 1 v — find the length of shortest path from vertex $ 1 $ to vertex $ v $ .
- 2 c $ l_{1}\ l_{2}\ ...\ l_{c} $ — add $ 1 $ to weights of edges with indices $ l_{1},l_{2},...,l_{c} $ .
Input Format
N/A
Output Format
N/A
Explanation/Hint
The description of changes of the graph in the first sample case:

The description of changes of the graph in the second sample case:
