Language: C++

#include<bits/stdc++.h>
using namespace std;
#define MAX_N 1111
#define pb push_back
#define fi first
#define sc second
typedef pair<ouble,int> P;
int N;
double Xs,Ys,Xt,Yt;
double X[MAX_N],Y[MAX_N],R[MAX_N];
double cost[MAX_N][MAX_N];
double s[MAX_N];
double dis(int i,int j);
int main()
{
	cout.precision(22);cin.precision(22);
	//printf("long double : %d\n", sizeof(long double));
	cin >> Xs >> Ys >> Xt >> Yt;
	cin >> N;
	for(int i=0;i<N;i++){
		cin >> X[i] >> Y[i] >> R[i];
	}
	X[N]=Xs;Y[N]=Ys;R[N]=0;
	X[N+1]=Xt;Y[N+1]=Yt;R[N+1]=0;N+=2;
	for(int i=0;i<N;i++){
		for(int j=i+1;j<N;j++){
			cost[i][j]=dis(i,j);
			//cout << i << " " << j << " " << cost[i][j] << "\n";
			cost[j][i]=cost[i][j];
		}
	}
	for(int i=0;i<N;i++){
		s[i]=3000000000;
	}
	priority_queue<P,vector<P>,greater<P> >que;
	que.push(P(0,N-2));
	while(!que.empty()){
		P p=que.top();que.pop();
		if(s[p.sc]<=p.fi)continue;
		s[p.sc]=p.fi;
		for(int i=0;i<N;i++){
			if(p.fi+cost[p.sc][i]<s[i]){
				que.push(P(p.fi+cost[p.sc][i],i));
			}
		}
	}
	
	cout << s[N-1] << "\n";
	return 0;
}
double dis(int i,int j){
	double l=sqrt((Y[j]-Y[i])*(Y[j]-Y[i])+(X[j]-X[i])*(X[j]-X[i]));
	l-=(R[i]+R[j]);
	if(l<0)return 0;
	return l;
}


Compiler output:
a.cc:7:14: error: 'ouble' was not declared in this scope; did you mean 'double'?
    7 | typedef pair<ouble,int> P;
      |              ^~~~~
      |              double
a.cc:7:23: error: template argument 1 is invalid
    7 | typedef pair<ouble,int> P;
      |                       ^
a.cc: In function 'int main()':
a.cc:36:25: error: expression list treated as compound expression in functional cast [-fpermissive]
   36 |         que.push(P(0,N-2));
      |                         ^
a.cc:6:12: error: request for member 'second' in 'p', which is of non-class type 'P' {aka 'int'}
    6 | #define sc second
      |            ^~~~~~
a.cc:39:24: note: in expansion of macro 'sc'
   39 |                 if(s[p.sc]<=p.fi)continue;
      |                        ^~
a.cc:5:12: error: request for member 'first' in 'p', which is of non-class type 'P' {aka 'int'}
    5 | #define fi first
      |            ^~~~~
a.cc:39:31: note: in expansion of macro 'fi'
   39 |                 if(s[p.sc]<=p.fi)continue;
      |                               ^~
a.cc:6:12: error: request for member 'second' in 'p', which is of non-class type 'P' {aka 'int'}
    6 | #define sc second
      |            ^~~~~~
a.cc:40:21: note: in expansion of macro 'sc'
   40 |                 s[p.sc]=p.fi;
      |                     ^~
a.cc:5:12: error: request for member 'first' in 'p', which is of non-class type 'P' {aka 'int'}
    5 | #define fi first
      |            ^~~~~
a.cc:40:27: note: in expansion of macro 'fi'
   40 |                 s[p.sc]=p.fi;
      |                           ^~
a.cc:5:12: error: request for member 'first' in 'p', which is of non-class type 'P' {aka 'int'}
    5 | #define fi first
      |            ^~~~~
a.cc:42:30: note: in expansion of macro 'fi'
   42 |                         if(p.fi+cost[p.sc][i]<s[i]){
      |                              ^~
a.cc:6:12: error: request for member 'second' in 'p', which is of non-class type 'P' {aka 'int'}
    6 | #define sc second
      |            ^~~~~~
a.cc:42:40: note: in expansion of macro 'sc'
   42 |                         if(p.fi+cost[p.sc][i]<s[i]){
      |                                        ^~
a.cc:5:12: error: request for member 'first' in 'p', which is of non-class type 'P' {aka 'int'}
    5 | #define fi first
      |            ^~~~~
a.cc:43:46: note: in expansion of macro 'fi'
   43 |                                 que.push(P(p.fi+cost[p.sc][i],i));
      |                                              ^~
a.cc:6:12: error: request for member 'second' in 'p', which is of non-class type 'P' {aka 'int'}
    6 | #define sc second
      |            ^~~~~~
a.cc:43:56: note: in expansion of macro 'sc'
   43 |                                 que.push(P(p.fi+cost[p.sc][i],i));
      |                                                        ^~
a.cc:43:64: error: expression list treated as compound expression in functional cast [-fpermissive]
   43 |                                 que.push(P(p.fi+cost[p.sc][i],i));
      |                                                                ^