func_code_string: #include <bits/stdc++.h>   using namespace std;   const long long INF = 1e9;   struct outgoing {     long long wt = INF, to = -1;   };   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     cout.tie(NULL);     ;     vector<long long> stations;     vector<pair<long long, long long>> connections;     long long n, i, j, k, t, temp;     cin >> n;     vector<outgoing> edge(n + 1);     pair<long long, long long> vertices[n + 1];     long long cost[n + 1];     long long mult[n + 1];     for (i = 1; i <= n; i++) {       cin >> vertices[i].first >> vertices[i].second;     }     for (i = 1; i <= n; i++) {       cin >> cost[i];       edge[i].wt = cost[i];       edge[i].to = i;     }     for (i = 1; i <= n; i++) {       cin >> mult[i];     }     long long total = 0;     vector<bool> selected(n + 1, false);     for (i = 1; i <= n; i++) {       long long v = -1;       for (j = 1; j <= n; j++) {         if (!selected[j] && (v == -1 || edge[j].wt < edge[v].wt)) {           v = j;         }       }       selected[v] = true;       long long x_now = vertices[v].first;       long long y_now = vertices[v].second;       if (edge[v].to == v) {         stations.push_back(v);       } else {         connections.push_back({v, edge[v].to});       }       total += edge[v].wt;       for (j = 1; j <= n; j++) {         long long x_diff = fabs(vertices[j].first - vertices[v].first);         long long y_diff = fabs(vertices[j].second - vertices[v].second);         if ((mult[v] + mult[j]) * (x_diff + y_diff) < edge[j].wt) {           edge[j].wt = (mult[v] + mult[j]) * (x_diff + y_diff);           edge[j].to = v;         }       }     }     cout << total << endl;     cout << stations.size() << endl;     for (auto x : stations) {       cout << x <<    ;     }     cout <<   n ;     cout << connections.size() << endl;     for (auto x : connections) {       cout << x.first <<     << x.second << endl;     }     return 0;   }   