Language: C++

#include <bits/stdc++.h>

using namespace std;

const double PI = 3.141592653589;
#define fastio ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define pb push_back
#define mp make_pair
#define int long long
#define all(c) (c).begin(),(c).end()
#define M 1000000007
#define INF LLONG_MAX
#define pr(...) dbs(#__VA_ARGS__, __VA_ARGS__)
template <class T> void dbs(string str, T t) {cerr << str << " : " << t << "\n";}
template <class T, class... S> void dbs(string str, T t, S... s) {int idx = str.find(','); cerr << str.substr(0, idx) << " : " << t << ", "; dbs(str.substr(idx + 1), s...);}
template <class S, class T>ostream& operator <<(ostream& os, const pair<S, T>& p) {return os << "(" << p.first << ", " << p.second << ")";}
template <class T>ostream& operator <<(ostream& os, const vector<T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class T>ostream& operator <<(ostream& os, const set<T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class S, class T>ostream& operator <<(ostream& os, const map<S, T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class T> void prc(T a, T b) {cerr << "["; for (T i = a; i != b; ++i) {if (i != a) cerr << ", "; cerr << *i;} cerr << "]\n";}
// Use pr(a,b,c,d,e) or cerr<<anything or prc(v.begin(),v.end()) or prc(v,v+n)
//  

int n;
vector<pair<int, int>> points;
long double eps = 1e-6;
bool incircle(pair<long double, long double> centre, long double radius)
{
    long double x = centre.first, y = centre.second;
    for(int i=0;i<n;i++)
    {
        if((long double)((x-points[i].first)*(x-points[i].first)) + (long double)((y-points[i].second)*(y-points[i].second)) - radius*radius > eps)
        {
            return false;
        }

    }
    return true;
}
// copied from gfg
vector<long double> findCircle(long double x1, long double y1, long double x2, long double y2, long double x3, long double y3) 
{ 
    long double x12 = x1 - x2; 
    long double x13 = x1 - x3; 
  
    long double y12 = y1 - y2; 
    long double y13 = y1 - y3; 
  
    long double y31 = y3 - y1; 
    long double y21 = y2 - y1; 
  
    long double x31 = x3 - x1; 
    long double x21 = x2 - x1; 
  
    // x1^2 - x3^2 
    long double sx13 = pow(x1, 2) - pow(x3, 2); 
  
    // y1^2 - y3^2 
    long double sy13 = pow(y1, 2) - pow(y3, 2); 
  
    long double sx21 = pow(x2, 2) - pow(x1, 2); 
    long double sy21 = pow(y2, 2) - pow(y1, 2); 
  
    long double f = ((sx13) * (x12) 
             + (sy13) * (x12) 
             + (sx21) * (x13) 
             + (sy21) * (x13)) 
            / (2 * ((y31) * (x12) - (y21) * (x13))); 
    long double g = ((sx13) * (y12) 
             + (sy13) * (y12) 
             + (sx21) * (y13) 
             + (sy21) * (y13)) 
            / (2 * ((x31) * (y12) - (x21) * (y13))); 
  
    long double c = -pow(x1, 2) - pow(y1, 2) - 2 * g * x1 - 2 * f * y1; 
  
    // eqn of circle be x^2 + y^2 + 2*g*x + 2*f*y + c = 0 
    // where centre is (h = -g, k = -f) and radius r 
    // as r^2 = h^2 + k^2 - c 
    long double h = -g; 
    long double k = -f; 
    long double sqr_of_r = h * h + k * k - c; 
  
    // r is the radius 
    long double r = sqrt(sqr_of_r); 
  	return {h, k, r};
    //cout << "Centre = (" << h << ", " << k << ")" << endl; 
    //cout << "Radius = " << r; 
} 
        
        

int32_t main()
{
    fastio;
    //freopen("file.in", "r", stdin);
    //freopen("file.out", "w", stdout);
    cin >> n;
    points.resize(n);
    for(int i=0;i<n;i++)
    {
        cin >> points[i].first >> points[i].second;
    }

    long double ans = 1000000.0;
    for(int i=0;i<n-1;i++)
    {
        for(int j=i+1;j<n;j++)
        {
            int x1 = points[i].first, y1 = points[i].second;
            int x2 = points[j].first, y2 = points[j].second;
            long double radius = sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2))/2.0;
            pr(x1, x2, y1, y2);
            bool check = incircle({(x1+x2)/2.0, (y1+y2)/2.0}, radius);
            if(check) ans = min(ans, radius);
        }
    }
    for(int i=0;i<n;i++)
    {
        for(int j=i+1;j<n;j++)
        {
            for(int k=0;k<n;k++)
            {
                vector<long double> z = findCircle(points[i].first, points[i].second, points[j].first, points[j].second, points[k].first, points[k].second);
                pair<long double, long double> center = {z.first, z.second};
                long double radius = z[2];
                bool check = incircle(center, radius);
                if(check) ans = min(ans, radius);
            }
        }
    }
    cout << fixed << setprecision(12) << ans << "\n";
    return 0;
}



Compiler output:
a.cc: In function 'int32_t main()':
a.cc:125:60: error: 'class std::vector<long double>' has no member named 'first'
  125 |                 pair<long double, long double> center = {z.first, z.second};
      |                                                            ^~~~~
a.cc:125:69: error: 'class std::vector<long double>' has no member named 'second'
  125 |                 pair<long double, long double> center = {z.first, z.second};
      |                                                                     ^~~~~~
a.cc:125:75: error: could not convert '{<expression error>, <expression error>}' from '<brace-enclosed initializer list>' to 'std::pair<long double, long double>'
  125 |                 pair<long double, long double> center = {z.first, z.second};
      |                                                                           ^
      |                                                                           |
      |                                                                           <brace-enclosed initializer list>