Language: C++

#include <bits/stdc++.h>
using namespace std;
const int maxn=1e3+10;
const double inf=1.0*(2e9+7);
const long long double dll;
struct node{
    int x,y,r;
}cir[maxn];
dll calc(node a,node b){
    return max(0.0,sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y))-a.r-b.r);
}
dll mat[maxn][maxn];
dll dis[maxn];
int sx,sy,ex,ey,n;
bool vis[maxn];
void Dijkstra(){
    int a=0;
   int p;
   dll mi;
    memset(vis,0,sizeof(vis));
    for(int i = 0; i <= n; i++)
        dis[i] = mat[a][i];
    dis[a] = 0;
    vis[a] = 1;
    for(int i = 0; i <= n; i++){
        mi = inf;
        for(int j = 0; j <= n; j++){
            if(dis[j]<mi && !vis[j]){
                p = j;
                mi = dis[j];
                 
            }
        }
        if(mi==inf) break;
        vis[p] = 1;
        for(int j=0; j <= n; j++){
            if(dis[p]+mat[p][j] < dis[j] && !vis[j])
                dis[j]=dis[p]+mat[p][j];
        }
    }
}
int main(){
    scanf("%d%d%d%d",&sx,&sy,&ex,&ey);
    cir[0].x=sx,cir[0].y=sy,cir[0].r=0;
    scanf("%d",&n);
    for (int i=1;i<=n;i++){
        scanf("%d%d%d",&cir[i].x,&cir[i].y,&cir[i].r);
    }
    n++;
    cir[n].x=ex,cir[n].y=ey,cir[n].r=0;
    for (int i=0;i<=n;i++){
        for (int j=0;j<=n;j++)
            mat[i][j]=inf;
    }
    for (int i=0;i<=n;i++){
        for (int j=0;j<=n;j++){
            mat[i][j]=calc(cir[i],cir[j]);
        }
    }
    Dijkstra();
//    for (int i=0;i<=n;i++){
//        printf("%d %lf\n",i,dis[i]);
//    }
    printf("%.9f\n",dis[n]);
    return 0;
}

Compiler output:
a.cc:5:12: error: 'long long' specified with 'double'
    5 | const long long double dll;
      |            ^~~~
a.cc:5:24: error: uninitialized 'const dll' [-fpermissive]
    5 | const long long double dll;
      |                        ^~~
a.cc:9:1: error: 'dll' does not name a type
    9 | dll calc(node a,node b){
      | ^~~
a.cc:12:1: error: 'dll' does not name a type
   12 | dll mat[maxn][maxn];
      | ^~~
a.cc:13:1: error: 'dll' does not name a type
   13 | dll dis[maxn];
      | ^~~
a.cc: In function 'void Dijkstra()':
a.cc:19:7: error: expected ';' before 'mi'
   19 |    dll mi;
      |       ^~~
      |       ;
a.cc:22:9: error: 'dis' was not declared in this scope; did you mean 'vis'?
   22 |         dis[i] = mat[a][i];
      |         ^~~
      |         vis
a.cc:22:18: error: 'mat' was not declared in this scope
   22 |         dis[i] = mat[a][i];
      |                  ^~~
a.cc:23:5: error: 'dis' was not declared in this scope; did you mean 'vis'?
   23 |     dis[a] = 0;
      |     ^~~
      |     vis
a.cc:26:9: error: 'mi' was not declared in this scope; did you mean 'i'?
   26 |         mi = inf;
      |         ^~
      |         i
a.cc:37:23: error: 'mat' was not declared in this scope
   37 |             if(dis[p]+mat[p][j] < dis[j] && !vis[j])
      |                       ^~~
a.cc: In function 'int main()':
a.cc:53:13: error: 'mat' was not declared in this scope
   53 |             mat[i][j]=inf;
      |             ^~~
a.cc:57:13: error: 'mat' was not declared in this scope
   57 |             mat[i][j]=calc(cir[i],cir[j]);
      |             ^~~
a.cc:57:23: error: 'calc' was not declared in this scope
   57 |             mat[i][j]=calc(cir[i],cir[j]);
      |                       ^~~~
a.cc:64:21: error: 'dis' was not declared in this scope; did you mean 'vis'?
   64 |     printf("%.9f\n",dis[n]);
      |                     ^~~
      |                     vis