Language: C++

#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <fstream>
#include <sstream>
#include <set>
#include <map>
#include <vector>
#include <list>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <string>
#include <queue>
#include <bitset>		//UWAGA - w czasie kompilacji musi byc znany rozmiar wektora - nie mozna go zmienic
#include <cassert>
#include <iomanip>		//do setprecision
#include <ctime>
#include <complex>
#include <chrono>
#include<unordered_map>
using namespace std;

struct point
{
	double x, y;

	point() = default;

	point(int x, int y)
	{
		this->x = x;
		this->y = y;
	}

	point(double x, double y)
	{
		this->x = x;
		this->y = y;
	}
};

point P[2010];

double sqr(double x)
{
	return x * x;
}

inline double dist(const point& a, const point& b)
{
	return sqrt(sqr(a.x - b.x) + sqr(a.y - b.y));
}

inline bool collinear(const point& a, const point& b, const point& c)
{
	return (a.y - b.y) * (a.x - c.x) ==
		(a.x - b.x) * (a.y - c.y);
}
inline point center(const point& a, const point& b)
{
	return point((a.x + b.x) / 2, (a.y + b.y) / 2);
}

struct circle
{
	point p;
	double r;

	circle(point p, double r)
	{
		this->p = p;
		this->r = r;
	}

	circle(point p1, point p2, point p3)
	{
		double x1 = p1.x, y1 = p1.y, x2 = p2.x, y2 = p2.y, x3 = p3.x, y3 = p3.y;

		double x12 = x1 - x2;
		double x13 = x1 - x3;

		double y12 = y1 - y2;
		double y13 = y1 - y3;

		double y31 = y3 - y1;
		double y21 = y2 - y1;

		double x31 = x3 - x1;
		double x21 = x2 - x1;

		// x1^2 - x3^2 
		double sx13 = pow(x1, 2) - pow(x3, 2);

		// y1^2 - y3^2 
		double sy13 = pow(y1, 2) - pow(y3, 2);

		double sx21 = pow(x2, 2) - pow(x1, 2);
		double sy21 = pow(y2, 2) - pow(y1, 2);

		double f = ((sx13) * (x12)
			+(sy13) * (x12)
			+(sx21) * (x13)
			+(sy21) * (x13))
			/ (2 * ((y31) * (x12)-(y21) * (x13)));
		double g = ((sx13) * (y12)
			+(sy13) * (y12)
			+(sx21) * (y13)
			+(sy21) * (y13))
			/ (2 * ((x31) * (y12)-(x21) * (y13)));

		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 
		double h = -g;
		double k = -f;
		double sqr_of_r = h * h + k * k - c;

		this->p = point(h, k);

		// r is the radius 
		this->r = sqrt(sqr_of_r);
	}

	bool outside(const point &p)
	{
		return sqr(p.x - this->p.x) + sqr(p.y - this->p.y) > sqr(this->r);
	}
};

int main()
{
	int i, j, k, l, n = 0;
	double x, y;
	//FILE *fp;								//for taking input from a .txt file
	//fp=fopen("input.txt","r");
	//fscanf(fp,"%d",&n);
	scanf("%d", &n);

	for (i = 0; i < n; i++) {							//get the points and store them in an array
		//fscanf(fp,"%lf %lf\n",&x,&y);
		scanf("%lf%lf", &x, &y);
		point p(x, y);
		P[i] = p;
	}
	//fclose(fp);
	circle c(P[0], DBL_MAX);						//initialize a dummy circle that encloses all the points
	for (i = 0; i < n; i++) {
		for (j = i + 1; j < n; j++) {
			for (k = j + 1; k < n; k++) {					//for every triplets of points
				if (collinear(P[i], P[j], P[k]))continue;	//if they are collinear don't do anything (this case will be considered in pair of points)
				circle c1(P[i], P[j], P[k]);		//else make a circle with the triplets
				if (c1.r > c.r)continue;
				for (l = 0; l < n; l++) {
					if (c1.outside(P[l]))break;
				}
				if (l == n)c = c1;					//if the new circle encloses all points and is smaller that dummy then update the dummy circle to store the smallest circle
			}
		}
	}
	for (i = 0; i < n; i++) {							//for every pair of points
		for (j = i + 1; j < n; j++) {
			circle c1(center(P[i], P[j]), dist(P[i], P[j]) / 2);		//make a circle with points as diametrically opposite
			if (c1.r > c.r)continue;
			for (l = 0; l < n; l++) {
				if (c1.outside(P[l]))break;
			}
			if (l == n)c = c1;						//if the new circle encloses all points and is smaller that dummy then update the dummy circle to store the smallest circle
		}
	}
	printf("%.10lf\n", c.r);

	//fp=fopen("output.txt","w");
	//fprintf(fp,"%lf,%lf\n%lf",c.center().xcoord(),c.center().ycoord(),c.radius());
	//fclose(fp);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:149:24: error: 'DBL_MAX' was not declared in this scope
  149 |         circle c(P[0], DBL_MAX);                                                //initialize a dummy circle that encloses all the points
      |                        ^~~~~~~
a.cc:22:1: note: 'DBL_MAX' is defined in header '<cfloat>'; this is probably fixable by adding '#include <cfloat>'
   21 | #include<unordered_map>
  +++ |+#include <cfloat>
   22 | using namespace std;