Language: C++

#include<bits/stdc++.h>
using namespace std;




template<typename T>  
T D2(T x1,T y1,T x2,T y2){return (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);}

int main() {
  long N;cin>>N;
  vector<long double>X(N),Y(N);
  for(long i=0;i<N;i++)cin>>X[i]>>Y[i];
  
  //最も遠い組を探す-> 中心はその2等分線上?
  long mp,mq;long double M=0;
  for(long p=0;p<N-1;p++)for(long q=p+1;q<N;q++){
    if(D2(X[p],Y[p],X[q],Y[q])>M){
      M=D2(X[p],Y[p],X[q],Y[q]);mp=p;mq=q;
    }
  }
  
  
  //これの中心からはみ出たもののうち最も遠いものを探す
  long double cx=(X[mp]+X[mq])/2,cy=(Y[mp]+Y[mq])/2;
  long double r2=M/4;
  long double MO=0;long double oi;bool a=false;
  for(int i=0;i<N;i++){
    if(i!=mp && i!=mq && D2(cx,cy,X[i],Y[i])>r2 && D2(cx,cy,X[i],Y[i])>MO){
      MO=D2(cx,cy,X[i],Y[i]);
      oi=i;a=true;
    }
  }
  cout<<fixed<<setprecision(20);
  if(a==false)cout<<sqrt(r2);
  else {
    //cout<<sqrt(D2(X[mp],Y[mp],(X[mp]+X[mq]+X[oi])/3,(Y[mp]+Y[mq]+Y[oi])/3));
    double sin=abs(((Y[mp]-Y[oi])*(X[mp]-X[oi])-(X[mp]-X[oi])*(Y[mp]-Y[oi]))
    /(sqrt(0,0,X[mp]-X[oi],Y[mp]-Y[oi])*sqrt(0,0,X[mq]-X[oi],Y[mq]-Y[oi])));
    cout<<sqrt(r2)/(2*sin);
  
  }
}

/*




*/

Compiler output:
a.cc: In function 'int main()':
a.cc:39:11: error: no matching function for call to 'sqrt(int, int, __gnu_cxx::__alloc_traits<std::allocator<long double>, long double>::value_type, __gnu_cxx::__alloc_traits<std::allocator<long double>, long double>::value_type)'
   39 |     /(sqrt(0,0,X[mp]-X[oi],Y[mp]-Y[oi])*sqrt(0,0,X[mq]-X[oi],Y[mq]-Y[oi])));
      |       ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/valarray:605,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166,
                 from a.cc:1:
/usr/include/c++/14/bits/valarray_after.h:458:5: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_UnClos<std::_Sqrt, std::_ValArray, _Tp>, _Tp> std::sqrt(const valarray<_Tp>&)'
  458 |     _DEFINE_EXPR_UNARY_FUNCTION(sqrt, struct std::_Sqrt)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:458:5: note:   candidate expects 1 argument, 4 provided
/usr/include/c++/14/bits/valarray_after.h:458:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_UnClos<std::_Sqrt, std::_Expr, _Dom>, typename _Dom::value_type> std::sqrt(const _Expr<_Dom1, typename _Dom1::value_type>&)'
  458 |     _DEFINE_EXPR_UNARY_FUNCTION(sqrt, struct std::_Sqrt)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:458:5: note:   candidate expects 1 argument, 4 provided
In file included from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/complex:1195:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::sqrt(const complex<_Tp>&)'
 1195 |     sqrt(const complex<_Tp>& __z) { return __complex_sqrt(__z.__rep()); }
      |     ^~~~
/usr/include/c++/14/complex:1195:5: note:   candidate expects 1 argument, 4 provided
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:114:
/usr/include/c++/14/cmath:454:5: note: candidate: 'template<class _Tp> constexpr typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type std::sqrt(_Tp)'
  454 |     sqrt(_Tp __x)
      |     ^~~~
/usr/include/c++/14/cmath:454:5: note:   candidate expects 1 argument, 4 provided
In file included from /usr/include/features.h:523,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:683,
                 from /usr/include/c++/14/cassert:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:33:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:176:1: note: candidate: 'double sqrt(double)'
  176 | __MATHCALL (sqrt,, (_Mdouble_ __x));
      | ^~~~~~~~~~
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:176:1: note:   candidate expects 1 argument, 4 provided
/usr/include/c++/14/cmath:446:3: note: candidate: 'constexpr long double std::sqrt(long double)'
  446 |   sqrt(long double __x)
      |   ^~~~
/usr/include/c++/14/cmath:446:3: note:   candidate expects 1 argument, 4 provided
/usr/include/c++/14/cmath:442:3: note: candidate: 'constexpr float std::sqrt(float)'
  442 |   sqrt(float __x)
      |   ^~~~
/usr/include/c++/14/cmath:442:3: note:   candidate expects 1 argument, 4 provided
a.cc:39:45: error: no matching function for call to 'sqrt(int, int, __gnu_cxx::__alloc_traits<std::allocator<long double>, long double>::value_type, __gnu_cxx::__alloc_traits<std::allocator<long double>, long double>::value_type)'
   39 |     /(sqrt(0,0,X[mp]-X[oi],Y[mp]-Y[oi])*sqrt(0,0,X[mq]-X[oi],Y[mq]-Y[oi])));
      |                                         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:458:5: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_UnClos<std::_Sqrt, std::_ValArray, _Tp>, _Tp> std::sqrt(const valarray<_Tp>&)'
  458 |     _DEFINE_EXPR_UNARY_FUNCTION(sqrt, struct std::_Sqrt)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:458:5: note:   candidate expects 1 argument, 4 provided
/usr/include/c++/14/bits/valarray_after.h:458:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_UnClos<std::_Sqrt, std::_Expr, _Dom>, typename _Dom::value_type> std::sqrt(const _Expr<_Dom1, typename _Dom1::value_type>&)'
  458 |     _DEFINE_EXPR_UNARY_FUNCTION(sqrt, struct std::_Sqrt)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:458:5: note:   candidate expects 1 argument, 4 provided
/usr/include/c++/14/complex:1195:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::sqrt(const complex<_Tp>&)'
 1195 |     sqrt(const complex<_Tp>& __z) { return __complex_sqrt(__z.__rep()); }
      |     ^~~~
/usr/include/c++/14/complex:1195:5: note:   candidate expects 1 argument, 4 provided
/usr/include/c++/14/cmath:454:5: note: candidate: 'template<class _Tp> constexpr typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type std::sqrt(_Tp)'
  454 |     sqrt(_Tp __x)
      |     ^~~~
/usr/include/c++/14/cmath:454:5: note:   candidate expects 1 argument, 4 provided
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:176:1: note: candidate: 'double sqrt(double)'
  176 | __MATHCALL (sqrt,, (_Mdouble_ __x));
      | ^~~~~~~~~~
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:176:1: note:   candidate expects 1 argument, 4 provided
/usr/include/c++/14/cmath:446:3: note: candidate: 'constexpr long double std::sqrt(long double)'
  446 |   sqrt(long double __x)
      |   ^~~~
/usr/include/c++/14/cmath:446:3: note:   candidate expects 1 argument, 4 provided
/usr/include/c++/14/cmath:442:3: note: candidate: 'constexpr float std::sqrt(float)'
  442 |   sqrt(float __x)
      |   ^~~~
/usr/include/c++/14/cmath:442:3: note:   candidate expects 1 argument, 4 provided