func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 105;   long long g[N][N], f[N][N], a[N], d;   int n;   pair<int, int> p[N];   void FloydWarshall() {     for (int i = 1; i <= n; i++) {       for (int j = 1; j <= n; j++) f[i][j] = g[i][j];       f[i][i] = 0;     }     for (int k = 1; k <= n; k++) {       for (int i = 1; i <= n; i++) {         for (int j = 1; j <= n; j++) {           f[i][j] = min(f[i][j], f[i][k] + f[k][j]);         }       }     }   }   int main() {     scanf( %d%lld , &n, &d);     for (int i = 2; i < n; i++) scanf( %lld , &a[i]);     for (int i = 1; i <= n; i++) scanf( %d%d , &p[i].first, &p[i].second);     for (int i = 2; i < n; i++) {       for (int j = 1; j <= n; j++) {         if (i == j) continue;         g[i][j] -= a[i];       }     }     for (int i = 1; i <= n; i++) {       for (int j = 1; j <= n; j++) {         if (i == j) continue;         g[i][j] +=             1ll * d *             (abs(p[i].first - p[j].first) + abs(p[i].second - p[j].second));       }     }     FloydWarshall();     printf( %lld , f[1][n]);     return 0;   }   