func_code_string: #include <bits/stdc++.h>   using namespace std;   long long n;   pair<long long, long long> loc[2001];   long long cp[2001];   long long cw[2001];   pair<long long, pair<long long, long long> > road[4000001];   long long ct = 0;   long long val[2001];   long long ans = 0;   long long ansleft;   long long ansr = 0;   bool cs[4000001];   struct node {     long long r, f;   } opt[100001];   long long fd(long long x) {     if (x != opt[x].f) opt[x].f = fd(opt[x].f);     return opt[x].f;   }   void mdf(long long x, long long y) {     x = fd(x), y = fd(y);     if (x == y) return;     if (opt[x].r < opt[y].r)       opt[x].f = y, opt[y].r += opt[x].r;     else       opt[y].f = x, opt[x].r += opt[y].r;   }   long long dis(long long x, long long y) {     return abs(loc[x].first - loc[y].first) + abs(loc[x].second - loc[y].second);   }   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     long long i, j;     for (long long i = 1; i <= 100000; i++) opt[i].f = i, opt[i].r = 1;     cin >> n, ansleft = n;     for (i = 1; i <= n; i++) cin >> loc[i].first >> loc[i].second;     for (i = 1; i <= n; i++) cin >> cp[i];     for (i = 1; i <= n; i++) cin >> cw[i];     for (i = 1; i <= n; i++) val[i] = cp[i];     for (i = 1; i <= n; i++) ans += cp[i];     for (i = 1; i <= n; i++)       for (j = i + 1; j <= n; j++)         road[++ct] = pair<long long, pair<long long, long long> >(             dis(i, j) * (cw[i] + cw[j]), pair<long long, long long>(i, j));     sort(road + 1, road + ct + 1);     for (i = 1; i <= ct; i++) {       pair<long long, pair<long long, long long> > f = road[i];       long long aa = fd(f.second.first), bb = fd(f.second.second);       if (aa != bb && f.first < max(val[aa], val[bb])) {         mdf(aa, bb);         long long father = fd(aa);         ans -= max(val[aa], val[bb]) - f.first;         val[father] = min(val[aa], val[bb]);         ansleft--, ansr++;         cs[i] = true;       }     }     cout << ans << endl;     cout << ansleft << endl;     for (i = 1; i <= n; i++) {       if (cp[i] == val[fd(i)]) cout << i <<    , val[fd(i)] = -1;     }     cout << endl;     cout << ansr << endl;     for (i = 1; i <= ct; i++)       if (cs[i])         cout << road[i].second.first <<     << road[i].second.second << endl;     return 0;   }   