Language: C++

struct edge{
	int to;
	double cost;
	edge(int _to, double _cost) :to(_to), cost(_cost){}
};

vector<edge> G[1010];
double xs, ys, xt, yt;
int n;
double d[1010];

void dijkstra(){
	REP(i, 1010)d[i] = 1e18;
	d[0] = 0;

	typedef pair<double, int> PD;
	priority_queue<PD, vector<PD>, greater<PD>> que;
	que.push(pair<double, int>(0, 0));

	while (!que.empty()){
		pair<double, int> p = que.top();
		que.pop();
		int v = p.second;
		if (d[v] < p.first)continue;
		for (int i = 0; i < G[v].size(); i++){
			edge e = G[v][i];
			if (d[e.to] > d[v] + e.cost){
				d[e.to] = d[v] + e.cost;
				que.push(pair<double, int>(d[e.to], e.to));
			}
		}
	}
}

int main(){
	cin >> xs >> ys >> xt >> yt >> n;
	vector<double> x(1010), y(1010), r(1010);
	x[0] = xs;
	y[0] = ys;
	r[0] = 0;
	x[n + 1] = xt;
	y[n + 1] = yt;
	r[n + 1] = 0;
	FOR(i, 1, n + 1){
		cin >> x[i] >> y[i] >> r[i];
	}
	REP(i, n + 2){
		REP(j, n + 2){
			if (i == j)continue;
			G[i].push_back(
				edge(j, max(0.0, sqrt((x[i] - x[j])*(x[i] - x[j]) + (y[i] - y[j])*(y[i] - y[j])) - (r[i] + r[j]))));
			//cout << i << " " << j << sqrt((x[i] - x[j])*(x[i] - x[j]) + (y[i] - y[j])*(y[i] - y[j])) - (r[i] + r[j]) << endl;
		}
	}


	dijkstra();
	printf("%.10lf\n", d[n + 1]);
}

Compiler output:
a.cc:7:1: error: 'vector' does not name a type
    7 | vector<edge> G[1010];
      | ^~~~~~
a.cc: In function 'void dijkstra()':
a.cc:13:13: error: 'i' was not declared in this scope
   13 |         REP(i, 1010)d[i] = 1e18;
      |             ^
a.cc:13:9: error: 'REP' was not declared in this scope
   13 |         REP(i, 1010)d[i] = 1e18;
      |         ^~~
a.cc:16:17: error: 'pair' does not name a type
   16 |         typedef pair<double, int> PD;
      |                 ^~~~
a.cc:17:9: error: 'priority_queue' was not declared in this scope
   17 |         priority_queue<PD, vector<PD>, greater<PD>> que;
      |         ^~~~~~~~~~~~~~
a.cc:17:24: error: 'PD' was not declared in this scope
   17 |         priority_queue<PD, vector<PD>, greater<PD>> que;
      |                        ^~
a.cc:17:28: error: 'vector' was not declared in this scope
   17 |         priority_queue<PD, vector<PD>, greater<PD>> que;
      |                            ^~~~~~
a.cc:17:38: error: expected primary-expression before ',' token
   17 |         priority_queue<PD, vector<PD>, greater<PD>> que;
      |                                      ^
a.cc:17:40: error: 'greater' was not declared in this scope
   17 |         priority_queue<PD, vector<PD>, greater<PD>> que;
      |                                        ^~~~~~~
a.cc:17:53: error: 'que' was not declared in this scope
   17 |         priority_queue<PD, vector<PD>, greater<PD>> que;
      |                                                     ^~~
a.cc:18:18: error: 'pair' was not declared in this scope
   18 |         que.push(pair<double, int>(0, 0));
      |                  ^~~~
a.cc:18:23: error: expected primary-expression before 'double'
   18 |         que.push(pair<double, int>(0, 0));
      |                       ^~~~~~
a.cc:18:31: error: expected primary-expression before 'int'
   18 |         que.push(pair<double, int>(0, 0));
      |                               ^~~
a.cc:21:22: error: expected primary-expression before 'double'
   21 |                 pair<double, int> p = que.top();
      |                      ^~~~~~
a.cc:23:25: error: 'p' was not declared in this scope
   23 |                 int v = p.second;
      |                         ^
a.cc:25:37: error: 'G' was not declared in this scope
   25 |                 for (int i = 0; i < G[v].size(); i++){
      |                                     ^
a.cc:29:47: error: expected primary-expression before 'double'
   29 |                                 que.push(pair<double, int>(d[e.to], e.to));
      |                                               ^~~~~~
a.cc:29:55: error: expected primary-expression before 'int'
   29 |                                 que.push(pair<double, int>(d[e.to], e.to));
      |                                                       ^~~
a.cc: In function 'int main()':
a.cc:36:9: error: 'cin' was not declared in this scope
   36 |         cin >> xs >> ys >> xt >> yt >> n;
      |         ^~~
a.cc:37:9: error: 'vector' was not declared in this scope
   37 |         vector<double> x(1010), y(1010), r(1010);
      |         ^~~~~~
a.cc:37:16: error: expected primary-expression before 'double'
   37 |         vector<double> x(1010), y(1010), r(1010);
      |                ^~~~~~
a.cc:38:9: error: 'x' was not declared in this scope; did you mean 'xt'?
   38 |         x[0] = xs;
      |         ^
      |         xt
a.cc:39:9: error: 'y' was not declared in this scope; did you mean 'yt'?
   39 |         y[0] = ys;
      |         ^
      |         yt
a.cc:40:9: error: 'r' was not declared in this scope
   40 |         r[0] = 0;
      |         ^
a.cc:44:13: error: 'i' was not declared in this scope
   44 |         FOR(i, 1, n + 1){
      |             ^
a.cc:44:9: error: 'FOR' was not declared in this scope
   44 |         FOR(i, 1, n + 1){
      |         ^~~
a.cc:47:9: error: 'REP' was not declared in this scope
   47 |         REP(i, n + 2){
      |         ^~~
a.cc:58:9: error: 'printf' was not declared in this scope
   58 |         printf("%.10lf\n", d[n + 1]);
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | struct edge{