func_code_string: #include <bits/stdc++.h>   using namespace std;   long long f[200][200], a[200], x[200], y[200], d;   int n;   long long dist(int i, int j) { return abs(x[i] - x[j]) + abs(y[i] - y[j]); }   int main() {     cin >> n >> d;     for (int i = 2; i <= n - 1; i++) cin >> a[i];     for (int i = 1; i <= n; i++) cin >> x[i] >> y[i];     memset(f, 61, sizeof(f));     for (int i = 1; i <= n; i++)       for (int j = 1; j <= n; j++)         if (i != j) f[i][j] = dist(i, j) * d - a[i];     for (int i = 1; i <= n; i++) 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]);     if (f[1][n] <= 0)       cout << 0;     else       cout << f[1][n];     return 0;   }   