Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <iomanip>

typedef long double ld;

using namespace std;

int main(int argc, char const *argv[])
{
    int n;
    ld radius;
    cin >> n;
    vector<int> x(n), y(n);
    for (int i = 0; i < n; i++) {
        cin >> x[i] >> y[i];
    }
    if (n == 2) {
        int dx = x[1] - x[0];
        int dy = y[1] - y[0];
        int dist = dx * dx + dy * dy;
        radius = sqrt((ld) dist) / 2.0;
    } else {
        for (int i = 0; i < n; i++) {
            for (int j = i + 1; j < n; j++) {
                for (int k = j + 1; k < n; k++) {
                    ld ax = (ld) (x[j] - x[i]);
                    ld ay = (ld) (y[j] - y[i]);
                    ld a = (ld) 0.5 * (ld) (x[j] * x[j] + y[j] * y[j] - x[i] * x[i] - y[i] * y[i]);
                    ld bx = (ld) (x[k] - x[i]);
                    ld by = (ld) (y[k] - y[i]);
                    ld b = (ld) 0.5 * (ld) (x[k] * x[k] + y[k] * y[k] - x[i] * x[i] - y[i] * y[i]);

                    // center
                    ld div, cx, cy;

                    // in the same line
                    if ((int) ax * (int) by - (int) bx * (int) ay == 0) {
                        cx = (ld) (max({x[i], x[j], x[k]}) + min(x[i], x[j], x[k])) * 0.5;
                        cy = (ld) (max({y[i], y[j], y[k]}) + min({y[i], y[j], y[k]})) * 0.5;
                    } else {
                        div = ax * by - bx * ay;
                        cx = (a * by - b * ay) / div;
                        cy = (b * ax - a * bx) / div;
                    }
                    // distance from the center
                    vector<ld> distance;
                    for (int l = 0; l < n; l++) {
                        ld dx = (ld) x[l] - cx;
                        ld dy = (ld) y[l] - cy;
                        ld d = sqrt(dx * dx + dy * dy);
                        distance.push_back(d);
                    }
                    if (i == 0 && j == 1 && k == 2) {
                        radius = *max_element(distance.begin(), distance.end());
                    } else {
                        radius = min(radius, *max_element(distance.begin(), distance.end()));                        
                    }
                }
            }
        }
    }
    cout << setprecision(12) << radius << endl;
    return 0;
}


Compiler output:
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:41:65:   required from here
   41 |                         cx = (ld) (max({x[i], x[j], x[k]}) + min(x[i], x[j], x[k])) * 0.5;
      |                                                              ~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
  284 |       if (__comp(__b, __a))
      |           ~~~~~~^~~~~~~~~~