func_code_string: #include <bits/stdc++.h>   using namespace std;   int n;   long long x[2005], y[2005];   long long c[2005];   long long k[2005];   bool vis[2005];   long long dis[2005];   long long tower[2005];   long long diss[2005];   long long way[2005][2005];   long long townum = 0;   long long add[2005][2];   long long addnum = 0;   long long ans = 0;   void pri() {     printf( %lld n , ans);     printf( %lld n , townum);     for (int i = 1; i <= townum; i++) {       printf( %lld  , tower[i]);     }     printf(  n%lld n , addnum);     for (int i = 1; i <= addnum; i++) {       printf( %lld %lld n , add[i][0], add[i][1]);     }   }   void init() {     for (int i = 1; i <= n; i++) {       for (int j = 1; j <= n; j++) {         way[i][j] = (abs(x[i] - x[j]) + abs(y[i] - y[j])) * (k[i] + k[j]);       }     }     for (int i = 1; i <= 2003; i++) dis[i] = 1e18;     for (int i = 1; i <= n; i++) way[i][0] = way[0][i] = c[i];   }   int main() {     scanf( %d , &n);     for (int i = 1; i <= n; i++) {       scanf( %lld%lld , &x[i], &y[i]);     }     int minn = 1;     for (int i = 1; i <= n; i++) {       scanf( %lld , &c[i]);     }     for (int i = 1; i <= n; i++) {       scanf( %lld , &k[i]);     }     init();     dis[0] = 0;     for (int i = 0; i <= n; i++) {       long long ma = 1e18 + 10;       int id = -1;       for (int j = 0; j <= n; j++) {         if (!vis[j] && dis[j] < ma) {           id = j;           ma = dis[j];         }       }       vis[id] = true;       ans += dis[id];       if (id != 0) {         if (diss[id] != 0) {           add[++addnum][0] = diss[id];           add[addnum][1] = id;         } else {           tower[++townum] = id;         }       }       for (int j = 0; j <= n; j++) {         if (!vis[j]) {           if (dis[j] > way[id][j]) {             dis[j] = way[id][j];             diss[j] = id;           }         }       }     }     pri();   }   