Language: C++

#include <iostream>
#include <vector>
#include <set>
#include <map>
#include <algorithm>
#include <cstdio>
#include <queue>
#include <complex>
using namespace std;
#define rep(i,n) for(int i = 0 ; i < n ; i++)

const double EPS = 1e-10;
typedef complex<double> P,point;
struct C {P p; double r;C(const P &p, double r) : p(p), r(r) { } C(){} };

vector<P> C_cp(C a,C b){
	vector<P> ret;
	double L = abs(a.p-b.p);
 
	if(	L-a.r-b.r > EPS || (abs(a.p-b.p)<EPS && fabs(a.r-b.r)<EPS) || 
		abs(a.p-b.p) < abs(a.r-b.r)
	)return ret;
 
	double theta = atan2(b.p.imag()-a.p.imag(),b.p.real()-a.p.real());
	double c = (L*L+a.r*a.r-b.r*b.r)/(2*L*a.r);
	ret.push_back(
		P(a.p.real()+a.r*cos(theta+acos(c)),
		  a.p.imag()+a.r*sin(theta+acos(c)))
	);
	if(fabs(L-a.r-b.r) > EPS)
		ret.push_back(
			P(a.p.real()+a.r*cos(theta-acos(c)),
			  a.p.imag()+a.r*sin(theta-acos(c)))
		);
	return ret;
}
 
 
bool have(C a,C b){
	return abs(a.p-b.p) + b.r <= a.r;
}
bool pHave(C a,P b){
	return abs(a.p-b) <= a.r;
}

bool hit( C a,C b ){
	return abs(a.p-b.p) < a.r + b.r;
}

double Len(const C &a,pair<P,P> cp){
	cp[0] -= a.p;
	cp[1] -= a.p;
	double U = atan2(cp[1].y,cp[1].x);
	double D = atan2(cp[0].y,cp[0].x);
	if( D > U ) D -= 2 * PI;
	return (2*a.r) * PI * (U - D) / (2 * PI);
}

int main(){
	int n;
	while(cin >> n && n){
		vector<C> c_;
		for(int i = 0 ; i < n ; i++){
			double x,y,r;
			cin >> x >> y >> r;
			c_.push_back(C(P(x,y),r));
		}
		bool dead[100] = {};
		for(int i = 0 ; i < n ; i++){
			for(int j = 0 ; j < n ; j++){
				if( i != j ){
					if( have(c_[i],c_[j]) ) dead[j] = true;
				}
			}
		}
		vector<C> c;
		for(int i = 0 ; i < n ; i++)
			if( !dead[i] ) c.push_back(c_[i]);
		
		vector< pair<P,P> > seg[100];
		
		n = c.size();
		
		for(int i = 0 ; i < n ; i++){ // kottiga 
			for(int j = 0 ; j < n ; j++){ // kottiwo taberu
				if( i != j && hit(c[i],c[j]) ){
					vector<P> cp = C_cp(c[i],c[j]);
					for(int k = 0 ; k < seg[j].size() ; k++){
						if( pHave(c[i],seg[j][k].first) && pHave(c[i],seg[j][k].second) ){
							
						}
					}
				}
			}
		}
	}
}

Compiler output:
a.cc: In function 'double Len(const C&, std::pair<std::complex<double>, std::complex<double> >)':
a.cc:51:11: error: no match for 'operator[]' (operand types are 'std::pair<std::complex<double>, std::complex<double> >' and 'int')
   51 |         cp[0] -= a.p;
      |           ^
a.cc:52:11: error: no match for 'operator[]' (operand types are 'std::pair<std::complex<double>, std::complex<double> >' and 'int')
   52 |         cp[1] -= a.p;
      |           ^
a.cc:53:28: error: no match for 'operator[]' (operand types are 'std::pair<std::complex<double>, std::complex<double> >' and 'int')
   53 |         double U = atan2(cp[1].y,cp[1].x);
      |                            ^
a.cc:53:36: error: no match for 'operator[]' (operand types are 'std::pair<std::complex<double>, std::complex<double> >' and 'int')
   53 |         double U = atan2(cp[1].y,cp[1].x);
      |                                    ^
a.cc:54:28: error: no match for 'operator[]' (operand types are 'std::pair<std::complex<double>, std::complex<double> >' and 'int')
   54 |         double D = atan2(cp[0].y,cp[0].x);
      |                            ^
a.cc:54:36: error: no match for 'operator[]' (operand types are 'std::pair<std::complex<double>, std::complex<double> >' and 'int')
   54 |         double D = atan2(cp[0].y,cp[0].x);
      |                                    ^
a.cc:55:30: error: 'PI' was not declared in this scope; did you mean 'P'?
   55 |         if( D > U ) D -= 2 * PI;
      |                              ^~
      |                              P
a.cc:56:26: error: 'PI' was not declared in this scope; did you mean 'P'?
   56 |         return (2*a.r) * PI * (U - D) / (2 * PI);
      |                          ^~
      |                          P