func_code_string: #include <bits/stdc++.h>   using namespace std;   using ll = long long;   using ull = unsigned long long;   using pii = pair<int, int>;   const int mod = 998244353;   const int maxn = 2e5 + 10;   struct edge {     int st, ed;     int w;     bool operator<(const edge &b) const { return w < b.w; }     edge() {}     edge(int st, int ed, int w) : st(st), ed(ed), w(w) {}   };   edge e[maxn];   int vet[805];   ll dis[805][805];   int temp[805], cnt;   int main() {     int n, m, k;     scanf( %d %d %d , &n, &m, &k);     for (int i = 0; i < m; ++i) {       int x, y, w;       scanf( %d %d %d , &x, &y, &w);       e[i] = edge(x, y, w);     }     sort(e, e + m);     for (int i = 0; i < min(m, k); ++i) {       temp[cnt++] = e[i].st;       temp[cnt++] = e[i].ed;     }     sort(temp, temp + cnt);     cnt = unique(temp, temp + cnt) - temp;     memset(dis, 0x3f, sizeof(dis));     for (int i = 0; i < min(m, k); ++i) {       int x, y;       x = lower_bound(temp, temp + cnt, e[i].st) - temp;       y = lower_bound(temp, temp + cnt, e[i].ed) - temp;       dis[x][y] = min(dis[x][y], (ll)e[i].w);       dis[y][x] = dis[x][y];     }     for (int a = 0; a < cnt; ++a) {       for (int i = 0; i < cnt; ++i) {         for (int j = i + 1; j < cnt; ++j) {           dis[i][j] = min(dis[i][j], dis[i][a] + dis[a][j]);           dis[j][i] = dis[i][j];         }       }     }     vector<ll> ans;     for (int i = 0; i < cnt; ++i) {       for (int j = i + 1; j < cnt; ++j) ans.push_back(dis[i][j]);     }     sort(ans.begin(), ans.end());     printf( %lld n , ans[k - 1]);   }   