Language: C++

#include <iostream>
#include <iomanip>
#include <complex>
#include <vector>
#include <algorithm>
#include <cmath>
#include <array>
#include <map>
using namespace std;
#define X real()
#define Y imag()
typedef complex<long double> P;
typedef vector<P> VP;
const long double EPS = 1e-8;
const long double INF = 1e12;

int main(){
    int n;
    cin >> n;
    VP p(n);
    for(int i=0; i<n; i++){
        long double x,y;
        cin >> x >> y;
        p[i] = P(x, y);
    }

    VP candp;
    vector<long double> candr;
    for(int i=0; i<n; i++){
        for(int j=i+1; j<n; j++){
            for(int k=j+1; k<n; k++){
                P pp[3] = {p[i], p[j], p[k]};
                long double sin2[3];
                for(int i=0; i<3; i++){
                    long double a = abs(pp[(i+1)%3] -pp[(i+2)%3]);
                    long double b = abs(pp[i] -pp[(i+1)%3]);
                    long double c = abs(pp[i] -pp[(i+2)%3]);
                    long double cosa = (b*b +c*c -a*a)/(2*b*c);
                    sin2[i] = sin(2*acos(cosa));
                }
                P center = (pp[0]*sin2[0] +pp[1]*sin2[1] +pp[2]*sin2[2])
                        *(1/(sin2[0] +sin2[1] +sin2[2]));
                candp.push_back(center);
                candr.push_back(abs(center -p[0]));
            }
            //2点を直径とする円
            candp.push_back((p[i] +p[j])/2.0);
            candr.push_back(abs(p[i] -p[j])/2.0);
        }
    }
    long double ans = INF;
    for(int i=0; i<(int)candp.size(); i++){
        bool ok = true;
        for(int j=0; j<n; j++){
            if(abs(candp[i] -p[j]) > candr[i] +EPS){
                ok = false;
                break;
            }
        }
        if(ok){
            ans = min(ans, candr[i]);
        }
    }
    cout << fixed << setprecision(10);
    cout << ans << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:47:41: error: no match for 'operator/' (operand types are 'std::complex<long double>' and 'double')
   47 |             candp.push_back((p[i] +p[j])/2.0);
      |                             ~~~~~~~~~~~~^~~~
      |                                   |      |
      |                                   |      double
      |                                   std::complex<long double>
In file included from a.cc:3:
/usr/include/c++/14/complex:430:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator/(const complex<_Tp>&, const complex<_Tp>&)'
  430 |     operator/(const complex<_Tp>& __x, const complex<_Tp>& __y)
      |     ^~~~~~~~
/usr/include/c++/14/complex:430:5: note:   template argument deduction/substitution failed:
a.cc:47:42: note:   mismatched types 'const std::complex<_Tp>' and 'double'
   47 |             candp.push_back((p[i] +p[j])/2.0);
      |                                          ^~~
/usr/include/c++/14/complex:439:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator/(const complex<_Tp>&, const _Tp&)'
  439 |     operator/(const complex<_Tp>& __x, const _Tp& __y)
      |     ^~~~~~~~
/usr/include/c++/14/complex:439:5: note:   template argument deduction/substitution failed:
a.cc:47:42: note:   deduced conflicting types for parameter 'const _Tp' ('long double' and 'double')
   47 |             candp.push_back((p[i] +p[j])/2.0);
      |                                          ^~~
/usr/include/c++/14/complex:448:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator/(const _Tp&, const complex<_Tp>&)'
  448 |     operator/(const _Tp& __x, const complex<_Tp>& __y)
      |     ^~~~~~~~
/usr/include/c++/14/complex:448:5: note:   template argument deduction/substitution failed:
a.cc:47:42: note:   mismatched types 'const std::complex<_Tp>' and 'double'
   47 |             candp.push_back((p[i] +p[j])/2.0);
      |                                          ^~~