func_code_string: #include <bits/stdc++.h>   using namespace std;   const long long INF = 1e15;   struct Edge {     int t, w;   } e[100010 << 1];   queue<int> g[100010];   long long d[100010], f[100010];   int i, j, k, n, m, q, x, h[100010];   struct _ {     int x;     _(int x) : x(x) {}     bool operator<(const _& a) const { return d[x] > d[a.x]; }   };   priority_queue<_> Q;   vector<int> V[100010];   int done[100010 << 2];   inline void Dij() {     for (i = 2; i <= n; i++) d[i] = INF;     Q.push(1);     while (!Q.empty()) {       x = Q.top().x;       Q.pop();       for (int j : V[x])         if (d[e[j].t] > d[x] + e[j].w) {           d[e[j].t] = d[x] + e[j].w;           Q.push(e[j].t);         }     }   }   int main() {     scanf( %d%d%d , &n, &m, &q);     for (int i = 1; i <= m; ++i) {       scanf( %d%d%d , &x, &e[i].t, &e[i].w);       V[x].push_back(i);     }     Dij();     for (int i = 1; i <= q; ++i) {       scanf( %d%d , &x, &k);       if (x == 1)         printf( %lld n , d[k] >= INF ? -1 : d[k]);       else {         for (int i = 1; i <= k; ++i) scanf( %d , &x), e[x].w++;         for (int i = 2; i <= n; ++i) f[i] = INF;         g[m = 0].push(1);         k = min(k, n - 1);         for (int i = 0; i <= m; ++i)           while (!g[i].empty()) {             x = g[i].front();             g[i].pop();             if (i > f[x]) continue;             for (int j : V[x]) {               long long y = f[x] + d[x] + e[j].w - d[e[j].t];               if (f[e[j].t] > y) {                 f[e[j].t] = y;                 if (y <= k) {                   g[y].push(e[j].t);                   if (y > m) m = y;                 }               }             }           }         for (int i = 2; i <= n; ++i) d[i] = min(INF, d[i] + f[i]);       }     }     return 0;   }   