Language: C++


#include "bits/stdc++.h"
#include <limits>
using namespace std;
#define REP(i, n) for(ll i = 0;i < n;i++)
#define ll long long
#define MOD 1000000007
using vi = vector<ll>; // intの1次元の型に vi という別名をつける
using vvi = vector<vi>; // intの2次元の型に vvi という別名をつける





//a,b=x0,y0
//c,d=x1,y1
//e,f=x2,y2
bool pxpy(double &a,double &b,double &c,double &d,double &e,double &f,double &outpx, double &outpy){
  double outpx,outpy;
  double ea=e-a;ca=c-a;bd=b-d;bf=b-f;aa=a*a;bb=b*b;cc=c*c;dd=d*d;
  if (ea*bd-ca*bf==0.0){return false;}
  outpy=ea*(aa+bb-cc-dd)-ca*(aa+bb-ee-ff);
  outpy=0.5*outpy/(ea*bd-ca*bf);
  if (c!=a){
    outpx=(2.0*bd*outpy-aa-bb+cc+dd)/(2.0*ca);
  }else{
    outpx=(2.0*bf*outpy-aa-bb+ee+ff)/(2.0*ea);
  }
  return true;
}


int n;
int main(){
  double ans=10000000000000000.0;
  cin >> n ;
  vector<double> x(n),y(n);
  REP(i,n){
    cin>>x[i]>>y[i];
  }

  if (n==2){
    double xx=x[0]-x[1];
    double yy=y[0]-y[1];
    cout<<sqrt(xx*xx+yy*yy)*0.5<<endl;
    return 0;
  }


  double py,px,tx,ty;
  double ltmp,lmax;
  REP(i,n){
    for(int j=i+1;j<n;j++){
      for(int k=j+1;k<n;k++){
        if (pxpy(x[i],y[i],x[j],y[j],x[k],y[k],px,py)==false)continue;
        lmax=0.0;
          for(int m=0;m<n;m++){
            tx=x[m]-px;
            ty=y[m]-py;
            ltmp=sqrt(tx*tx+ty*ty);
            //if (isinf(ltmp)){

            //}else{
              lmax=max(lmax,ltmp);
            //}
          }
        ans=min(ans,lmax);
      }
    }
  }



  double ans2=1000000000000.0;
  
   
  REP(i,n){
    for(int j=i+1;j<n;j++){
      double xx=(x[i]-x[j])*0.5+x[j];
      double yy=(y[i]-y[j])*0.5+y[j];
      lmax=0.0;
      REP(k,n)
      {
        ltmp=sqrt((xx-x[k])*(xx-x[k])+(yy-y[k])*(yy-y[k]));
        lmax=max(lmax,ltmp);
      }
      ans2=min(ans2,lmax);
    }
  }
  

  cout<<setprecision(16)<<min(ans,ans2)<<endl;
  return 0;
}

for(int i=0;i<n;i++){
  for(int j=i+1;j<n;j++){
    for(int k=j+1;k<n;k++){
      
    }
  }
}




Compiler output:
a.cc: In function 'bool pxpy(double&, double&, double&, double&, double&, double&, double&, double&)':
a.cc:19:10: error: declaration of 'double outpx' shadows a parameter
   19 |   double outpx,outpy;
      |          ^~~~~
a.cc:18:79: note: 'double& outpx' previously declared here
   18 | bool pxpy(double &a,double &b,double &c,double &d,double &e,double &f,double &outpx, double &outpy){
      |                                                                       ~~~~~~~~^~~~~
a.cc:19:16: error: declaration of 'double outpy' shadows a parameter
   19 |   double outpx,outpy;
      |                ^~~~~
a.cc:18:94: note: 'double& outpy' previously declared here
   18 | bool pxpy(double &a,double &b,double &c,double &d,double &e,double &f,double &outpx, double &outpy){
      |                                                                                      ~~~~~~~~^~~~~
a.cc:20:17: error: 'ca' was not declared in this scope; did you mean 'ea'?
   20 |   double ea=e-a;ca=c-a;bd=b-d;bf=b-f;aa=a*a;bb=b*b;cc=c*c;dd=d*d;
      |                 ^~
      |                 ea
a.cc:20:24: error: 'bd' was not declared in this scope; did you mean 'b'?
   20 |   double ea=e-a;ca=c-a;bd=b-d;bf=b-f;aa=a*a;bb=b*b;cc=c*c;dd=d*d;
      |                        ^~
      |                        b
a.cc:20:31: error: 'bf' was not declared in this scope; did you mean 'b'?
   20 |   double ea=e-a;ca=c-a;bd=b-d;bf=b-f;aa=a*a;bb=b*b;cc=c*c;dd=d*d;
      |                               ^~
      |                               b
a.cc:20:38: error: 'aa' was not declared in this scope; did you mean 'ea'?
   20 |   double ea=e-a;ca=c-a;bd=b-d;bf=b-f;aa=a*a;bb=b*b;cc=c*c;dd=d*d;
      |                                      ^~
      |                                      ea
a.cc:20:45: error: 'bb' was not declared in this scope; did you mean 'b'?
   20 |   double ea=e-a;ca=c-a;bd=b-d;bf=b-f;aa=a*a;bb=b*b;cc=c*c;dd=d*d;
      |                                             ^~
      |                                             b
a.cc:20:52: error: 'cc' was not declared in this scope; did you mean 'c'?
   20 |   double ea=e-a;ca=c-a;bd=b-d;bf=b-f;aa=a*a;bb=b*b;cc=c*c;dd=d*d;
      |                                                    ^~
      |                                                    c
a.cc:20:59: error: 'dd' was not declared in this scope; did you mean 'd'?
   20 |   double ea=e-a;ca=c-a;bd=b-d;bf=b-f;aa=a*a;bb=b*b;cc=c*c;dd=d*d;
      |                                                           ^~
      |                                                           d
a.cc:22:36: error: 'ee' was not declared in this scope; did you mean 'ea'?
   22 |   outpy=ea*(aa+bb-cc-dd)-ca*(aa+bb-ee-ff);
      |                                    ^~
      |                                    ea
a.cc:22:39: error: 'ff' was not declared in this scope; did you mean 'f'?
   22 |   outpy=ea*(aa+bb-cc-dd)-ca*(aa+bb-ee-ff);
      |                                       ^~
      |                                       f
a.cc: At global scope:
a.cc:96:1: error: expected unqualified-id before 'for'
   96 | for(int i=0;i<n;i++){
      | ^~~
a.cc:96:13: error: 'i' does not name a type; did you mean 'vi'?
   96 | for(int i=0;i<n;i++){
      |             ^
      |             vi
a.cc:96:17: error: 'i' does not name a type; did you mean 'vi'?
   96 | for(int i=0;i<n;i++){
      |                 ^
      |                 vi