criyle/codenet-compile-errors huggingface dataset:
Language: C++

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

int x[55],y[55];
double distance(int I,int J){
    return sqrt((x[I]-x[J])*(x[I]-x[J])+(y[I]-y[J])*(y[I]-y[J]));
}

int main(){
    int n;
    cin >> n;
    double ans=1e9;
    double tmp;
    double a,b,c;
    double A,B,C;
    queue<pair<double,double>> q;
    for(int i=0;i<n;i++)cin >> x[i] >> y[i];
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            if(i==j)continue;
            else{
                for(int k=0;k<n;k++){
                    if(i==k || j==k)q.push(make_pair((x[i]+x[j])/2.0,(y[i]+y[j])/2.0));
                    else{
                        a=distance(i,j);
                        b=distance(k,j);
                        c=distance(i,k);
                        if(a+b>c && a+c>b && b+c>a){
                            A=sin(2.0*acos((b*b+c*c-a*a)/(2.0*b*c)));
                            B=sin(2.0*acos((a*a+c*c-b*b)/(2.0*a*c))));
                            C=sin(2.0*acos((a*a+b*b-c*c)/(2.0*a*b)))));
                            q.push(make_pair((A*x[k]+B*x[i]+C*x[j])/(A+B+C),(A*y[k]+B*y[i]+C*y[j])/(A+B+C)));
                        }
                    }
            }}
        }
    }
    while(!q.empty()){
        tmp=0;
        for(int i=0;i<n;i++)tmp=max(tmp,sqrt((x[i]-q.front().first)*(x[i]-q.front().first)+(y[i]-q.front().second)*(y[i]-q.front().second)));
        ans=min(tmp,ans);
    }
    cout << fixed << setprecision(16);
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:69: error: expected ';' before ')' token
   30 |                             B=sin(2.0*acos((a*a+c*c-b*b)/(2.0*a*c))));
      |                                                                     ^
      |                                                                     ;
a.cc:31:69: error: expected ';' before ')' token
   31 |                             C=sin(2.0*acos((a*a+b*b-c*c)/(2.0*a*b)))));
      |                                                                     ^
      |                                                                     ;
Language: C++

#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
#define N 64
 
long double ans, curr;
pair <long double, long double> v[N];
pair <long double, long double> C, P;
int i, j, n;
 
long double dist (pair <long double, long double> A, pair <long double, long double>B){
    long double d = sqrt((A.first - B.first) * (A.first - B.first) + (A.second - B.second) * (A.second - B.second));
    return d;
}
int main()
{
    cin >> n;
    for (i = 0; i < n; ++i){
        cin >> v[i].first >> v[i].second;
        C.first += v[i].first;
        C.second += v[i].second;
    }
    for (i = 0; i < n; ++i)
    for (j = 0; j < n; ++j){
        ans = max (ans, dist (v[i], v[j]));
    }
    C.first /= n;
    C.second /= n;
    for (i = 0; i < n; ++i)
        ans = max (ans, dist(C, v[i]));
  	for (i = 0; i < n; ++i)
      for (j = 0; j < n; ++j)
        for (it = 0; it < n; ++it){
          	curr = 0;
        	P.first = (v[i].x + v[j].x + v[it].x) / 3;
          	P.second = (v[i].y + v[j].y + v[it].y) / 3;
          	for (jt = 0; jt < n; ++jt){
            	curr = max(curr, dist(P, v[jt]));
            }
          	ans = min(curr, ans);
        }
    cout << fixed << setprecision(7) << ans / 2.0;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:14: error: 'it' was not declared in this scope; did you mean 'int'?
   34 |         for (it = 0; it < n; ++it){
      |              ^~
      |              int
a.cc:36:33: error: 'struct std::pair<long double, long double>' has no member named 'x'
   36 |                 P.first = (v[i].x + v[j].x + v[it].x) / 3;
      |                                 ^
a.cc:36:42: error: 'struct std::pair<long double, long double>' has no member named 'x'
   36 |                 P.first = (v[i].x + v[j].x + v[it].x) / 3;
      |                                          ^
a.cc:37:34: error: 'struct std::pair<long double, long double>' has no member named 'y'
   37 |                 P.second = (v[i].y + v[j].y + v[it].y) / 3;
      |                                  ^
a.cc:37:43: error: 'struct std::pair<long double, long double>' has no member named 'y'
   37 |                 P.second = (v[i].y + v[j].y + v[it].y) / 3;
      |                                           ^
a.cc:38:22: error: 'jt' was not declared in this scope; did you mean 'jn'?
   38 |                 for (jt = 0; jt < n; ++jt){
      |                      ^~
      |                      jn
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (ll i = 0; i < n; ++i)
using namespace std;
using ll = long long;
using ull = long long unsigned;
using P = pair<double,double>;

int n;
vector<P> v(55);


double dist(P a, P b){
	double dx=a.first-b.first;
	double dy=a.second-b.second;
	return sqrt(dx*dx+dy*dy);
}


//(x,y)を中心とする円で全ての頂点を含む時の半径
double f(double x,double y){
	double res=0;
	rep(i,n){
		res=max(res,dist(make_pair(x,y),v[i]));
	}
	return res;
}


//三分探索、x座標固定
double g(double x){
	double l=0, r=1000;
	rep(i,80){
		double c1=(l*2+r)/3;
		double c2=(l+r*2)/3;
		if (f(x,c1)>f(x,c2)) l=c1;else r=c2;
	}
	return f(x,l);

}


int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
cin>>n;
rep(i,n){
	double t1,t2;
	cin>>t1>>t2;
	v[i]=make_pair(t1,t2);
}
double l=0,r=1000;
rep(i,80){
	double c1=(l*2+r)/3;
	double c2=(l+r*2)/3;
	if (g(c1)>g(c2)) l=c1;else r=c2;

}
double ans=g(l);
cout<<ans;

}
#include <bits/stdc++.h>
#define rep(i,n) for (ll i = 0; i < n; ++i)
using namespace std;
using ll = long long;
using ull = long long unsigned;
using P = pair<double,double>;

int n;
vector<P> v(55);


double dist(P a, P b){
	double dx=a.first-b.first;
	double dy=a.second-b.second;
	return sqrt(dx*dx+dy*dy);
}


//(x,y)を中心とする円で全ての頂点を含む時の半径
double f(double x,double y){
	double res=0;
	rep(i,n){
		res=max(res,dist(make_pair(x,y),v[i]));
	}
	return res;
}


//三分探索、x座標固定
double g(double x){
	double l=0, r=1000;
	rep(i,80){
		double c1=(l*2+r)/3;
		double c2=(l+r*2)/3;
		if (f(x,c1)>f(x,c2)) l=c1;else r=c2;
	}
	return f(x,l);

}


int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
cin>>n;
rep(i,n){
	double t1,t2;
	cin>>t1>>t2;
	v[i]=make_pair(t1,t2);
}
double l=0,r=1000;
rep(i,80){
	double c1=(l*2+r)/3;
	double c2=(l+r*2)/3;
	if (g(c1)>g(c2)) l=c1;else r=c2;

}
double ans=g(l);
cout<<ans;

}


Compiler output:
a.cc:69:5: error: redefinition of 'int n'
   69 | int n;
      |     ^
a.cc:8:5: note: 'int n' previously declared here
    8 | int n;
      |     ^
a.cc:70:11: error: redefinition of 'std::vector<std::pair<double, double> > v'
   70 | vector<P> v(55);
      |           ^
a.cc:9:11: note: 'std::vector<std::pair<double, double> > v' previously declared here
    9 | vector<P> v(55);
      |           ^
a.cc:73:8: error: redefinition of 'double dist(P, P)'
   73 | double dist(P a, P b){
      |        ^~~~
a.cc:12:8: note: 'double dist(P, P)' previously defined here
   12 | double dist(P a, P b){
      |        ^~~~
a.cc:81:8: error: redefinition of 'double f(double, double)'
   81 | double f(double x,double y){
      |        ^
a.cc:20:8: note: 'double f(double, double)' previously defined here
   20 | double f(double x,double y){
      |        ^
a.cc:91:8: error: redefinition of 'double g(double)'
   91 | double g(double x){
      |        ^
a.cc:30:8: note: 'double g(double)' previously defined here
   30 | double g(double x){
      |        ^
a.cc:103:5: error: redefinition of 'int main()'
  103 | int main(){
      |     ^~~~
a.cc:42:5: note: 'int main()' previously defined here
   42 | int main(){
      |     ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <cmath>
#include <iomanip>
#define rep(i,n) for(int i=0; i<(int)(n); i++)

using namespace std;
typedef long long LL;
const double INF=1000000;

int main(){
  int N;
  cin >> N;
  vector<double> x(N), y(N);
  double ans=INF;
  rep(i,N) cin >> x[i] >> y[i];
  if(N==2){
    cout << sqrt((x[0]-x[1])*(x[0]-x[1])+(y[0]-y[1])*(y[0]-y[1]))/2 << endl;
    return 0;
  }
  rep(i,N-2){
    for(int j=i+1; j<N-1; j++){
      for(int k=j+1; k<N; k++){
        double X, Y;
        double a=x[i]-x[j], b=y[i]-y[j], c=x[j]-x[k], d=y[j]-y[k];
        if(a*d-b*c==0){
          double vx[3]={x[i],x[j],x[k]}, vy[3]={y[i],y[j],y[k]};
          sort(vx,vx+3);
          sort(vy,vy+3);
          X=(vx[0]+vx[2])/2, Y=(vy[0]+vy[2])/2;
        }
        else{
          X=d*((x[i]*x[i]+y[i]*y[i])-(x[j]*x[j]+y[j]*y[j]))
          -b*((x[j]*x[j]+y[j]*y[j])-(x[k]*x[k]+y[k]*y[k]));
          Y=-c*((x[i]*x[i]+y[i]*y[i])-(x[j]*x[j]+y[j]*y[j]))
          +a*((x[j]*x[j]+y[j]*y[j])-(x[k]*x[k]+y[k]*y[k]));
          X/=2*(a*d-b*c), Y/=2*(a*d-b*c);
        }
        double dist=0;
        rep(l,N){
          d=sqrt((X-x[l])*(X-x[l])+(Y-y[l])*(Y-y[l]));
          dist=max(dist,d);
        }
        ans=min(ans,dist);
      }
    }
  }
  cout << setprecision(15) << ans << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:11: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   28 |           sort(vx,vx+3);
      |           ^~~~
      |           sqrt
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr long double EPS = 1e-10;
template <typename T>
class P
{
public:
    T x, y;
    T add(T x, T y)
    {
        if (abs(x + y) < EPS * (abs(a) + abs(b)))
            return 0;
        return x + y;
    }
    P() {}
    P(T x, T y) : x(x), y(y)
    {
    }
    P operator+(P p)
    {
        return P(add(x, p.x), add(y, p.y));
    }
    P operator-(P p)
    {
        return P(add(x, -p.x), add(y, p.y));
    }
    P operator*(T d)
    {
        return P(x * d, y * d);
    }
    T dot(P p)
    {
        return add(x * p.x, y * p.y);
    }
    T det(P p)
    {
        return add(x * p.y, -y * p.x);
    }
};

int main()
{
    ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    int n;
    cin >> n;
    vector<P<long double>> xy(n);
    for (int i = 0; i < n; i++)
    {
        long double x, y;
        cin >> x >> y;
        xy[i] = P<long double>(x, y);
    }
    vector<P<long double>> qs(n * 2);
    int k = 0;
    for (int i = 0; i < n; i++)
    {
        while (k > 1 && (qs[k - 1] - qs[k - 2]).det(xy[i] - xy[k - 1]) <= 0)
        {
            k--;
        }
        qs[k++] = xy[i];
    }
    for (int i = n - 2, t = k; i >= 0; i--)
    {
        while (k > t && (qs[k - 1] - qs[k - 2]).det(xy[i] - qs[k - 1]) <= 0)
        {
            k--;
        }
        qs[k++] = xy[i];
    }
    qs.resize(k - 1);

    long double ans = 0;
    for (int i = 0; i < qs.size(); i++)
    {
        for (int j = 0; j < i; j++)
        {
            ans = max<ll>(ans, sqrtl((qs[i] - qs[j]).dot(qs[i] - qs[j])));
        }
    }
    cout << fixed << setprecision(15) << ans / 2.0000000000 << endl;
}

Compiler output:
a.cc: In member function 'T P<T>::add(T, T)':
a.cc:12:37: error: 'a' was not declared in this scope
   12 |         if (abs(x + y) < EPS * (abs(a) + abs(b)))
      |                                     ^
a.cc:12:46: error: 'b' was not declared in this scope
   12 |         if (abs(x + y) < EPS * (abs(a) + abs(b)))
      |                                              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr long double EPS = 1e-10;
template <typename T>
class P
{
public:
    T x, y;
    T add(T x, T y)
    {
        if (abs(x + y) < EPS * (abs(x) + abs(y)))
            return 0;
        return a + b;
    }
    P() {}
    P(T x, T y) : x(x), y(y)
    {
    }
    P operator+(P p)
    {
        return P(add(x, p.x), add(y, p.y));
    }
    P operator-(P p)
    {
        return P(add(x, -p.x), add(y, p.y));
    }
    P operator*(T d)
    {
        return P(x * d, y * d);
    }
    T dot(P p)
    {
        return add(x * p.x, y * p.y);
    }
    T det(P p)
    {
        return add(x * p.y, -y * p.x);
    }
};

int main()
{
    ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    int n;
    cin >> n;
    vector<P<long double>> xy(n);
    for (int i = 0; i < n; i++)
    {
        long double x, y;
        cin >> x >> y;
        xy[i] = P<long double>(x, y);
    }
    vector<P<long double>> qs(n * 2);
    int k = 0;
    for (int i = 0; i < n; i++)
    {
        while (k > 1 && (qs[k - 1] - qs[k - 2]).det(xy[i] - xy[k - 1]) <= 0)
        {
            k--;
        }
        qs[k++] = xy[i];
    }
    for (int i = n - 2, t = k; i >= 0; i--)
    {
        while (k > t && (qs[k - 1] - qs[k - 2]).det(xy[i] - qs[k - 1]) <= 0)
        {
            k--;
        }
        qs[k++] = xy[i];
    }
    qs.resize(k - 1);

    long double ans = 0;
    for (int i = 0; i < qs.size(); i++)
    {
        for (int j = 0; j < i; j++)
        {
            ans = max<ll>(ans, sqrtl((qs[i] - qs[j]).dot(qs[i] - qs[j])));
        }
    }
    cout << fixed << setprecision(15) << ans / 2.0000000000 << endl;
}

Compiler output:
a.cc: In member function 'T P<T>::add(T, T)':
a.cc:14:16: error: 'a' was not declared in this scope
   14 |         return a + b;
      |                ^
a.cc:14:20: error: 'b' was not declared in this scope
   14 |         return a + b;
      |                    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr long double EPS = 1e-10;
template <typename T>
class P
{
public:
    T x, y;
    T add(T x, T y)
    {
        if (abs(x + y) < EPS * (abs(a) + abs(b)))
            return 0;
        return a + b;
    }
    P() {}
    P(T x, T y) : x(x), y(y)
    {
    }
    P operator+(P p)
    {
        return P(add(x, p.x), add(y, p.y));
    }
    P operator-(P p)
    {
        return P(add(x, -p.x), add(y, p.y));
    }
    P operator*(T d)
    {
        return P(x * d, y * d);
    }
    T dot(P p)
    {
        return add(x * p.x, y * p.y);
    }
    T det(P p)
    {
        return add(x * p.y, -y * p.x);
    }
};

int main()
{
    ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    int n;
    cin >> n;
    vector<P<long double>> xy(n);
    for (int i = 0; i < n; i++)
    {
        long double x, y;
        cin >> x >> y;
        xy[i] = P<long double>(x, y);
    }
    vector<P<long double>> qs(n * 2);
    int k = 0;
    for (int i = 0; i < n; i++)
    {
        while (k > 1 && (qs[k - 1] - qs[k - 2]).det(xy[i] - xy[k - 1]) <= 0)
        {
            k--;
        }
        qs[k++] = xy[i];
    }
    for (int i = n - 2, t = k; i >= 0; i--)
    {
        while (k > t && (qs[k - 1] - qs[k - 2]).det(xy[i] - qs[k - 1]) <= 0)
        {
            k--;
        }
        qs[k++] = xy[i];
    }
    qs.resize(k - 1);

    long double ans = 0;
    for (int i = 0; i < qs.size(); i++)
    {
        for (int j = 0; j < i; j++)
        {
            ans = max<ll>(ans, sqrtl((qs[i] - qs[j]).dot(qs[i] - qs[j])));
        }
    }
    cout << fixed << setprecision(15) << ans / 2.0000000000 << endl;
}

Compiler output:
a.cc: In member function 'T P<T>::add(T, T)':
a.cc:12:37: error: 'a' was not declared in this scope
   12 |         if (abs(x + y) < EPS * (abs(a) + abs(b)))
      |                                     ^
a.cc:12:46: error: 'b' was not declared in this scope
   12 |         if (abs(x + y) < EPS * (abs(a) + abs(b)))
      |                                              ^
a.cc:14:16: error: 'a' was not declared in this scope
   14 |         return a + b;
      |                ^
a.cc:14:20: error: 'b' was not declared in this scope
   14 |         return a + b;
      |                    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr long double EPS = 1e-10;
template <typename T>
class P
{
public:
    T x, y;
    T add(T x, T y){
        double} P() {}
    P(T x, T y) : x(x), y(y)
    {
    }
    P operator+(P p)
    {
        return P(add(x, p.x), add(y, p.y));
    }
    P operator-(P p)
    {
        return P(add(x, -p.x), add(y, p.y));
    }
    P operator*(T d)
    {
        return P(x * d, y * d);
    }
    T dot(P p)
    {
        return add(x * p.x, y * p.y);
    }
    T det(P p)
    {
        return add(x * p.y, -y * p.x);
    }
};
int main()
{
    ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    int n;
    cin >> n;
    vector<P<long double>> xy(n);
    for(int i = 0; i < n; i++){
        long double x,y;
        cin >> x >> y;
        xy[i] = P<long double>(x,y);
    }
    vector<P<long double>> qs(n * 2);
    int k = 0;
    for(int i = 0; i < n; i++){
        while(k > 1 && (qs[k - 1] - qs[k - 2]).det(xy[i] - xy[k - 1]) <= 0){
            k--;
        }
        qs[k++] = xy[i];
    }
    for(int i = n - 2, t = k; i >= 0; i--){
        while(k > t && (qs[k - 1] - qs[k - 2]).det(xy[i] - qs[k - 1]) <= 0){
            k--;
        }
        qs[k++] = xy[i];
    }
    qs.resize(k - 1);

    long double ans = 0;
    for(int i = 0; i < qs.size(); i++){
        for(int j = 0; j < i; j++){
            ans = max<long double>(ans, sqrtl((qs[i] - qs[j]).dot(qs[i] -  qs[j])));
        }
    }
    cout << fixed << setprecision(15) << ans / 2.0000000000 << endl;
}


Compiler output:
a.cc: In member function 'T P<T>::add(T, T)':
a.cc:11:15: error: expected unqualified-id before '}' token
   11 |         double} P() {}
      |               ^
a.cc: In instantiation of 'T P<T>::add(T, T) [with T = long double]':
a.cc:21:18:   required from 'P<T> P<T>::operator-(P<T>) [with T = long double]'
   21 |         return P(add(x, -p.x), add(y, p.y));
      |                  ^~~
a.cc:51:45:   required from here
   51 |         while(k > 1 && (qs[k - 1] - qs[k - 2]).det(xy[i] - xy[k - 1]) <= 0){
      |                                             ^
a.cc:11:15: warning: no return statement in function returning non-void [-Wreturn-type]
   11 |         double} P() {}
      |               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ld=long double;

int main(){

    long long int n;
    cin>>n;
    vector<pair<ld,ld>> xy;
    for (size_t i = 0; i < n; i++)
    {   
        ld x,y;
        cin>>x>>y;
        xy.emplace_back(make_pair(x,y));
    }
    ld a,b,r;
    r=1.0e9;
    for (size_t i = 0; i < n; i++)
    {
        for (size_t j = 0; j < i; j++)
        {
            ld tmp=hypot(xy[i].first-xy[j].first,xy[i].second-xy[j].second);
            if(tmp>r){
                a=(xy[i].first+xy[j].first)*0.5;
                b=(xy[i].second+xy[j].second)*0.5;
                r=tmp*0.5;
            }
        }
    }
    result=r;
    cout<<result<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:5: error: 'result' was not declared in this scope
   30 |     result=r;
      |     ^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,j,n) for(int i=(int)(j);i<(int)(n);i++)
#define REP(i,j,n) for(int i=(int)(j);i<=(int)(n);i++)
#define MOD 1000000007
#define int long long
#define ALL(a) (a).begin(),(a).end()
#define vi vector<int>
#define vii vector<vi>
#define pii pair<int,int>
#define priq priority_queue<int>
#define disup(A,key) distance(A.begin(),upper_bound(ALL(A),(int)(key)))
#define dislow(A,key) distance(A.begin(),lower_bound(ALL(A),(int)(key)))
#define tii tuple<int,int,int>
#define Priq priority_queue<int,vi,greater<int>>
#define pb push_back
#define mp make_pair
#define INF (1ll<<62)-1
#define MAX 1000000000
signed main(){
    int N; cin>>N;
    vi A(N),B(N);
    rep(i,0,N) cin>>A[i]>>B[i];
    double ans;
    if(N==2){
        int X=A[0]-A[1],Y=B[0]-B[1]:
        ans=sqrt(X*X+Y*Y)/2.0;
    }
    else{
        rep(i,0,N-2){
            rep(j,i+1,N-1){
                rep(k,j+1,N){
                    int C=A[j]-A[i],D=B[j]-B[i].E=A[k]-A[i],F=B[k]-B[i],G=A[k]-A[j],H=B[k]-B[j];
                    double S=abs(C*F+D*E)*2.0;
                    double P=sqrt(C*C+D*D),Q=sqrt(E*E+F*F),R=sqrt(G*G+H*H);
                    double T=P*Q*R;
                    ans=max(ans,T/S);           
                }
            }
        }
    }
    printf("%.10lf\n",ans);
}



Compiler output:
a.cc: In function 'int main()':
a.cc:26:36: error: expected ',' or ';' before ':' token
   26 |         int X=A[0]-A[1],Y=B[0]-B[1]:
      |                                    ^
a.cc:33:49: error: request for member 'E' in 'B.std::vector<long long int>::operator[](((std::vector<long long int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'}
   33 |                     int C=A[j]-A[i],D=B[j]-B[i].E=A[k]-A[i],F=B[k]-B[i],G=A[k]-A[j],H=B[k]-B[j];
      |                                                 ^
a.cc:34:36: error: 'F' was not declared in this scope
   34 |                     double S=abs(C*F+D*E)*2.0;
      |                                    ^
a.cc:34:40: error: 'E' was not declared in this scope
   34 |                     double S=abs(C*F+D*E)*2.0;
      |                                        ^
a.cc:36:34: error: 'R' was not declared in this scope
   36 |                     double T=P*Q*R;
      |                                  ^
Language: C

#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n ,a,b,k,j=0;
	cin>>n;
	for(int i = 0 ; i < n ; i++)
	{
		cin>>a>>b;
		k=abs((a-b)*(a-b));
         j += k;		
	}
	cout<<setprecision(18)<<fixed<<(sqrt(j)/2);
}

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<iomanip>
#include<cmath>
#include<tuple>
#include<queue>
#include<algorithm>
 
int const MAXN = 50;
double const INF = 1e9;
double const eps = 5e-7;
int x[MAXN], y[MAXN], a;
 
double min_possible(double cx, double cy, double r) {
  double res = 0.0;
  for(int i = 0; i < a; ++i) {
    double dx = x[i] - cx, dy = y[i] - cy;
    dx = std::max(std::fabs(dx) - r, 0.0);
    dy = std::max(std::fabs(dy) - r, 0.0);
    res = std::max(res, dx*dx + dy*dy);
  }
  return std::sqrt(res);
}
 
double calc(double cx, double cy) {
  double res = 0.0;
  for(int i = 0; i < N; ++i) {
    double dx = x[i] - cx, dy = y[i] - cy;
    res = std::max(res, dx*dx + dy*dy);
  }
  return std::sqrt(res);
}
 
int main() {
  std::cin >> a;
  for(int i = 0; i < a; ++i) std::cin >> x[i] >> y[i];
  
  std::queue<std::tuple<double, double, double>> q;
  double ans = INF;
  q.emplace(500.0, 500.0, 500.0);
  while(q.size()>0) {
    double xx, yy, rr; 
    std::tie(xx, yy, rr) = q.front(); q.pop();
    double d = min_possible(xx, yy, rr);
    if(d >= ans - eps*std::max(d, 1.0)) continue; // cut-off no improve
    ans = std::min(ans, calc(xx, yy));
    for(double rx: {-0.5, 0.5}) for(double ry: {-0.5, 0.5}) {
      q.emplace(xx+rx*rr, yy+ry*rr, rr*0.5);
    }
  }
  std::cout << std::setprecision(10) << std::fixed << ans << std::endl;
  return 0;
}

Compiler output:
a.cc: In function 'double calc(double, double)':
a.cc:26:22: error: 'N' was not declared in this scope
   26 |   for(int i = 0; i < N; ++i) {
      |                      ^
Language: C


#include<iostream>
#include<iomanip>
#include<cmath>
#include<tuple>
#include<queue>
#include<algorithm>
 // Initialize number
int const MAXN = 50;
double const INF = 1e9;
double const eps = 5e-7;
int x[MAXN], y[MAXN], N;
 
double min_possible(double cx, double cy, double r) {
  double res = 0.0;
  for(int i = 0; i < N; ++i) {
    double dx = x[i] - cx, dy = y[i] - cy;
    dx = std::max(std::fabs(dx) - r, 0.0);
    dy = std::max(std::fabs(dy) - r, 0.0);
    res = std::max(res, dx*dx + dy*dy);
  }
  return std::sqrt(res);
}
 
double calc(double cx, double cy) {
  double res = 0.0;
  for(int i = 0; i < N; ++i) {
    double dx = x[i] - cx, dy = y[i] - cy;
    res = std::max(res, dx*dx + dy*dy);
  }
  return std::sqrt(res);
}
 
int main() {
  std::cin >> N;
  for(int i = 0; i < N; ++i) std::cin >> x[i] >> y[i];
  
  std::queue<std::tuple<double, double, double>> q;
  double ans = INF;
  q.emplace(500.0, 500.0, 500.0);
  while(q.size()>0) {
    double xx, yy, rr; 
    std::tie(xx, yy, rr) = q.front(); q.pop();
    double d = min_possible(xx, yy, rr);
    if(d >= ans - eps*std::max(d, 1.0)) continue; // cut-off no improve
    ans = std::min(ans, calc(xx, yy));
    for(double rx: {-0.5, 0.5}) for(double ry: {-0.5, 0.5}) {
      q.emplace(xx+rx*rr, yy+ry*rr, rr*0.5);
    }
  }
  std::cout << std::setprecision(10) << std::fixed << ans << std::endl;
  return 0;
}

Compiler output:
main.c:2:9: fatal error: iostream: No such file or directory
    2 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include<iostream>
#include<iomanip>
#include<cmath>
#include<tuple>
#include<queue>
#include<algorithm>
 
int const MAXN = 50;
double const INF = 1e9;
double const eps = 5e-7;
int x[MAXN], y[MAXN], N;
 
double min_possible(double cx, double cy, double r) {
  double res = 0.0;
  for(int i = 0; i < N; ++i) {
    double dx = x[i] - cx, dy = y[i] - cy;
    dx = std::max(std::fabs(dx) - r, 0.0);
    dy = std::max(std::fabs(dy) - r, 0.0);
    res = std::max(res, dx*dx + dy*dy);
  }
  return std::sqrt(res);
}
 
double calc(double cx, double cy) {
  double res = 0.0;
  for(int i = 0; i < N; ++i) {
    double dx = x[i] - cx, dy = y[i] - cy;
    res = std::max(res, dx*dx + dy*dy);
  }
  return std::sqrt(res);
}
 
int main() {
  std::cin >> N;
  for(int i = 0; i < N; ++i) std::cin >> x[i] >> y[i];
  
  std::queue<std::tuple<double, double, double>> q;
  double ans = INF;
  q.emplace(500.0, 500.0, 500.0);
  while(q.size()>0) {
    double xx, yy, rr; 
    std::tie(xx, yy, rr) = q.front(); q.pop();
    double d = min_possible(xx, yy, rr);
    if(d >= ans - eps*std::max(d, 1.0)) continue; // cut-off no improve
    ans = std::min(ans, calc(xx, yy));
    for(double rx: {-0.5, 0.5}) for(double ry: {-0.5, 0.5}) {
      q.emplace(xx+rx*rr, yy+ry*rr, rr*0.5);
    }
  }
  std::cout << std::setprecision(10) << std::fixed << ans << std::endl;
  return 0;
}

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include<iostream>
#include<iomanip>
#include<cmath>
#include<tuple>
#include<queue>
#include<algorithm>
//s.k
 
int const MAXN = 50;
double const INF = 1e9;
double const eps = 5e-7;
int x[MAXN], y[MAXN], N;
 
double min_possible(double cx, double cy, double r) {
  double res = 0.0;
  for(int i = 0; i < N; ++i) {
    double dx = x[i] - cx, dy = y[i] - cy;
    dx = std::max(std::fabs(dx) - r, 0.0);
    dy = std::max(std::fabs(dy) - r, 0.0);
    res = std::max(res, dx*dx + dy*dy);
  }
  return std::sqrt(res);
}
 
double calc(double cx, double cy) {
  double res = 0.0;
  for(int i = 0; i < N; ++i) {
    double dx = x[i] - cx, dy = y[i] - cy;
    res = std::max(res, dx*dx + dy*dy);
  }
  return std::sqrt(res);
}
 
int main() {
  std::cin >> N;
  for(int i = 0; i < N; ++i) std::cin >> x[i] >> y[i];
  
  std::queue<std::tuple<double, double, double>> q;
  double ans = INF;
  q.emplace(500.0, 500.0, 500.0);
  while(q.size()>0) {
    double xx, yy, rr; 
    std::tie(xx, yy, rr) = q.front(); q.pop();
    double d = min_possible(xx, yy, rr);
    if(d >= ans - eps*std::max(d, 1.0)) continue; // cut-off no improve
    ans = std::min(ans, calc(xx, yy));
    for(double rx: {-0.5, 0.5}) for(double ry: {-0.5, 0.5}) {
      q.emplace(xx+rx*rr, yy+ry*rr, rr*0.5);
    }
  }
  std::cout << std::setprecision(10) << std::fixed << ans << std::endl;
  return 0;
}

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
double dis(double x1,double y1,double x2,double y2){
	return ((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
}
int main(){
	double n;
	double s,e,max=0;
	cin>>n;
	double arr[n][2];
	for(double i=0;i<n;i++){
		double x,y;
		cin>>x>>y;
		arr[i][0]=x;
		arr[i][1]=y;
	}
	for(double i=0;i<n;i++){
		for(double j=i+1;j<n;j++){
			double d=dis(arr[i][0],arr[i][1],arr[j][0],arr[j][1]);
//			cout<<d<<endl;
			if(d>max) {
				max=d;
				s=i;
				e=j;
			}
			
		}
	}
//	cout<<s<<" "<<e<<endl;
	double rad=sqrt(max)/2;
	printf("%.12lf",rad);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:20: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
   12 |         double arr[n][2];
      |                    ^
a.cc:12:20: error: could not convert 'n' from 'double' to 'long unsigned int'
   12 |         double arr[n][2];
      |                    ^
      |                    |
      |                    double
a.cc:12:20: error: size of array 'arr' has non-integral type 'double'
a.cc:16:20: error: invalid types 'double [1][2][double]' for array subscript
   16 |                 arr[i][0]=x;
      |                    ^
a.cc:17:20: error: invalid types 'double [1][2][double]' for array subscript
   17 |                 arr[i][1]=y;
      |                    ^
a.cc:21:41: error: invalid types 'double [1][2][double]' for array subscript
   21 |                         double d=dis(arr[i][0],arr[i][1],arr[j][0],arr[j][1]);
      |                                         ^
a.cc:21:51: error: invalid types 'double [1][2][double]' for array subscript
   21 |                         double d=dis(arr[i][0],arr[i][1],arr[j][0],arr[j][1]);
      |                                                   ^
a.cc:21:61: error: invalid types 'double [1][2][double]' for array subscript
   21 |                         double d=dis(arr[i][0],arr[i][1],arr[j][0],arr[j][1]);
      |                                                             ^
a.cc:21:71: error: invalid types 'double [1][2][double]' for array subscript
   21 |                         double d=dis(arr[i][0],arr[i][1],arr[j][0],arr[j][1]);
      |                                                                       ^
Language: C++

function preorder(u) {
    if u is null then return
    print u.label
    r = either 0 or 1 with 50% probability
    if r == 0
        preorder(u.left_child)
        preorder(u.right_child)
    if r == 1
        preorder(u.right_child)
        preorder(u.left_child)
}

Compiler output:
a.cc:1:1: error: 'function' does not name a type; did you mean 'union'?
    1 | function preorder(u) {
      | ^~~~~~~~
      | union
Language: C

#include<stdio.h>
#include<math.h>
typedef struct
{
     int x;
     int y;
}point;

double distance(point * A, double x, double y)
{
    return sqrt(pow(A->x - x, 2) + pow(A->y - y, 2));
}


void main()
{
    int i = 0 , j = 0, test = 0, number_of_warehouse = 0, A = 0, B = 0, C = 0;
    point * point_array , *closest_points, sum;
    double avgx = 0.0, avgy  = 0.0, Total_dist = 0.0;
    scanf("%d", &test);

    while (test--)
    {
        scanf("%d", &number_of_warehouse);
        point_array = malloc (sizeof(point) * number_of_warehouse);
        closest_points = malloc (sizeof(point) * number_of_warehouse);
        scanf("%d%d%d", &A, &B,&C);
        sum.x = 0;
        sum.y = 0;
        avgx = 0;
        avgy = 0;
        for(i = 0; i < number_of_warehouse; ++i)
        {
            scanf("%d%d", &(point_array[i].x), &(point_array[i].y));
            closest_points[i].x = (B*(B * point_array[i].x - A * point_array[i].y) - A *C)/ (A*A + B*B);
            closest_points[i].y = (A*((-1)* B * point_array[i].x + A * point_array[i].y) - B *C)/ (A*A + B*B);
            sum.x +=  closest_points[i].x;
            sum.y +=  closest_points[i].y;
        }
        Total_dist = 0.0;
        avgx = sum.x / number_of_warehouse;
        avgy = sum.y / number_of_warehouse;
        for(i = 0; i < number_of_warehouse; ++i)
        {
            Total_dist += distance(point_array + i, avgx, avgy);
        }
        printf("%.6f", Total_dist);
    }
    return 0;}

Compiler output:
main.c: In function 'main':
main.c:25:23: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
   25 |         point_array = malloc (sizeof(point) * number_of_warehouse);
      |                       ^~~~~~
main.c:3:1: note: include '<stdlib.h>' or provide a declaration of 'malloc'
    2 | #include<math.h>
  +++ |+#include <stdlib.h>
    3 | typedef struct
main.c:25:23: warning: incompatible implicit declaration of built-in function 'malloc' [-Wbuiltin-declaration-mismatch]
   25 |         point_array = malloc (sizeof(point) * number_of_warehouse);
      |                       ^~~~~~
main.c:25:23: note: include '<stdlib.h>' or provide a declaration of 'malloc'
main.c:49:12: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   49 |     return 0;}
      |            ^
main.c:15:6: note: declared here
   15 | void main()
      |      ^~~~
Language: C++

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

const int MaxN = 1e5 + 10;
const int MOD = 1e9 + 7;
const int INF = 1e9;

pair < double, double > p[MaxN];
pair < double, char > all[MaxN];
int n, k;

bool can(double rad) {
  int res = 1;
  for (int i = 1; i <= n && res < k; ++i) {
    int c = 1, sz = 0;
    for (int j = 1; j <= n; ++j) {
      if (i == j) {
        continue;
      }
      double d = hypot(p[i].first - p[j].first, p[i].second - p[j].second);
      if (d / 2 > rad) {
        continue;
      }
      pair < double, double > v = make_pair((p[j].first - p[i].first) / d, (p[j].second - p[i].second) / d);
      double l1 = d / 2;
      double l2 = sqrt(rad * rad - l1 * l1);
      l1 /= rad;
      l2 /= rad;
      pair < double, double > p1 = make_pair(v.first * l1 + v.second * l2, v.second * l1 - v.first * l2);
      pair < double, double > p2 = make_pair(v.first * l1 - v.second * l2, v.second * l1 + v.first * l2);
      double ang1 = atan2(p1.second, p1.first);
      double ang2 = atan2(p2.second, p2.first);
      if (ang1 > ang2) {
        c++;
      }
      all[sz++] = make_pair(ang1, 1);
      all[sz++] = make_pair(ang2 + 1e-10, -1);
    }
    sort(all, all + sz);
    for (int j = 0; j < sz; ++j) {
      c += all[j].second;
      if (res < c) {
        res = c;
      }
    }
  }
  return res >= k;
}

int main() {

  
  cin >> n >> k;
  for (int i = 1; i <= n; ++i) {
    cin >> p[i].first >> p[i].second;
  }
  random_shuffle(p + 1, p + n + 1);
  double l = 0, r = 1e4;
  for (int it = 0; it < 22; ++it) {
    double m = (l + r) / 2;
    if (can(m)) {
      r = m;
    } else {
      l = m;
    }
  }
  cout.precision(6);
  cout << fixed << (l + r) / 2.0 << '\n';
  return 0;
}

Compiler output:
a.cc:1:9: fatal error: bitss/stdc++.h: No such file or directory
    1 | #include<bitss/stdc++.h>
      |         ^~~~~~~~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
#include<math.h>
typedef struct
{
     int x;
     int y;
}point;

double distance(point * A, double x, double y)
{
    return sqrt(pow(A->x - x, 2) + pow(A->y - y, 2));
}


int main()
{
    int i = 0 , j = 0, test = 0, number_of_warehouse = 0, A = 0, B = 0, C = 0;
    point * point_array , *closest_points, sum;
    double avgx = 0.0, avgy  = 0.0, Total_dist = 0.0;
    scanf("%d", &test);

    while (test--)
    {
        scanf("%d", &number_of_warehouse);
        point_array = malloc (sizeof(point) * number_of_warehouse);
        closest_points = malloc (sizeof(point) * number_of_warehouse);
        scanf("%d%d%d", &A, &B,&C);
        sum.x = 0;
        sum.y = 0;
        avgx = 0;
        avgy = 0;
        for(i = 0; i < number_of_warehouse; ++i)
        {
            scanf("%d%d", &(point_array[i].x), &(point_array[i].y));
            closest_points[i].x = (B*(B * point_array[i].x - A * point_array[i].y) - A *C)/ (A*A + B*B);
            closest_points[i].y = (A*((-1)* B * point_array[i].x + A * point_array[i].y) - B *C)/ (A*A + B*B);
            sum.x +=  closest_points[i].x;
            sum.y +=  closest_points[i].y;
        }
        Total_dist = 0.0;
        avgx = sum.x / number_of_warehouse;
        avgy = sum.y / number_of_warehouse;
        for(i = 0; i < number_of_warehouse; ++i)
        {
            Total_dist += distance(point_array + i, avgx, avgy);
        }
        printf("%.6f", Total_dist);
    }
    return 0;

Compiler output:
main.c: In function 'main':
main.c:25:23: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
   25 |         point_array = malloc (sizeof(point) * number_of_warehouse);
      |                       ^~~~~~
main.c:3:1: note: include '<stdlib.h>' or provide a declaration of 'malloc'
    2 | #include<math.h>
  +++ |+#include <stdlib.h>
    3 | typedef struct
main.c:25:23: warning: incompatible implicit declaration of built-in function 'malloc' [-Wbuiltin-declaration-mismatch]
   25 |         point_array = malloc (sizeof(point) * number_of_warehouse);
      |                       ^~~~~~
main.c:25:23: note: include '<stdlib.h>' or provide a declaration of 'malloc'
main.c:49:5: error: expected declaration or statement at end of input
   49 |     return 0;
      |     ^~~~~~
Language: C++

#include <bits/stdc++>
using namespace std;
#define F(i,a,b) for(int i = (int)(a); i <= (int)(b); i++)
#define RF(i,a,b) for(int i = (int)(a); i >= (int)(b); i--)
int main()
{
    int X,Y; //X:number of rows, Y: number of columns
    X = Y = 10; //assuming 10X10 matrix
    int Cost[X][Y];

    F(i,0,X-1)
    {
        F(j,0,Y-1)
        {
            //Take input the cost of visiting cell (i,j)
            cin>>Cost[i][j];
        }
    }

    int MinCost[X][Y]; //declare the minCost matrix

    MinCost[0][0] = Cost[0][0];

    // initialize first row of MinCost matrix
    F(j,1,Y-1)
        MinCost[0][j] = MinCost[0][j-1] + Cost[0][j];

    //Initialize first column of MinCost Matrix
    F(i,1,X-1)
        MinCost[i][0] = MinCost[i-1][0] + Cost[i][0];

    //This bottom-up approach ensures that all the sub-problems needed
    // have already been calculated.
    F(i,1,X-1)
    {
        F(j,1,Y-1)
        {
            //Calculate cost of visiting (i,j) using the
            //recurrence relation discussed above
            MinCost[i][j] = min(MinCost[i-1][j],MinCost[i][j-1]) + Cost[i][j];
        }
    }

    cout<<"Minimum cost from (0,0) to (X,Y) is "<<MinCost[X-1][Y-1];
    return 0;
}

Compiler output:
a.cc:1:10: fatal error: bits/stdc++: No such file or directory
    1 | #include <bits/stdc++>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
using namespace std;
long long fab(long long  n)
{
if(n<2)
return 1;
else{
return n*fab(n-2);
}
}
int main()
{
long long   n,count=0;
cin>>n;
long long res=fab(n)
while(res%10==0)
{
count++;
res=res/10;
}
cout<<count;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:1: error: expected ',' or ';' before 'while'
   16 | while(res%10==0)
      | ^~~~~
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#define rep(i, n) for(i = 0; i < (n); i++)
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
#define MOD 1000000007
#define INF 1 << 30

using namespace std;
typedef long long ll;
typedef pair<int, int> pp;
typedef struct {
	double x, y;
} point;

point Vertic(double r, point a, point b) {
	double h, k;
	h = sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y)) / 2.0;
	k = sqrt(r * r - h * h);
	point ans = { a.y - b.y, b.x - a.x };
	ans = { ans.x * k / (h * 2.0), ans.y * k / (h * 2.0) };
	return ans;
}

int Out(point a, double r, vector<point>& d) {
	r *= r;
	for (int i = 0; i < d.size(); i++) {
		if (r < (a.x - d[i].x) * (a.x - d[i].x) + (a.y - d[i].y) * (a.y - d[i].y))
			return false;
	}
	return true;
}

int Judge(double r, vector<point>& d) {
	int i, j;
	point a, b, ab, v, p1, p2;
	for (i = 0; i < d.size() - 1; i++) {
		a = d[i];
		for (j = i + 1; j < d.size(); j++) {
			b = d[j];
			ab = { (b.x - a.x) / 2.0, (b.y - a.y) / 2.0 };
			v = Vertic(r, a, b);
			p1 = { a.x + ab.x + v.x, a.y + ab.y + v.y };
			p2 = { -p1.x, -p1.y };
			if (Out(p1, r, d) && Out(p2, r, d))
				return false;
		}
	}
	return true;
}

int main(void) {
	int num, i;
	double ans, out = 0.0, safe = 2000.0, r;
	cin >> num;
	vector<point> d(num);
	rep(i, num)
		cin >> d[i].x >> d[i].y;
	rep(i, 70) {
		r = (out + safe) / 2.0;
		if (Judge(r, d))
			safe = r;
		else
			out = r;
	}
	ans = safe;
	printf("%.10lf\n", ans);
	return 0;
}

Compiler output:
a.cc: In function 'point Vertic(double, point, point)':
a.cc:20:13: error: 'sqrt' was not declared in this scope
   20 |         h = sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y)) / 2.0;
      |             ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <cstdio>
#include <iomanip>

using namespace std;
#define double long double
int n;
double ans = 1e9;

struct pnt{
    double x, y;
};

pnt a[500];

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

double dist(pnt a, pnt b)
{
    return sqr(a.x - b.x) + sqr(a.y - b.y);
}

struct line{
    double a, b, c;
};

line line_by_pnts(pnt a, pnt b)
{
    line l;
    l.a = a.y - b.y;
    l.b = b.x - a.x;
    l.c = -l.a * a.x - l.b * a.y;
    return l;
}

line perpendiculare(line l, pnt b)
{
    line k;
    k.a = -l.b;
    k.b = l.a;
    k.c = -k.a * b.x - k.b * b.y;
    return k;
}

pnt homotetion(pnt a, pnt b, double k)
{
    pnt c;
    c.x = a.x + (b.x - a.x) * k;
    c.y = a.y + (b.y - a.y) * k;
    return c;
}

pnt intersection(line a, line b)
{
    pnt x;
    x.y = (b.c * a.a - a.c * b.a) / (a.b * b.a - a.a * b.b);
    x.x = (b.c * a.b - a.c * b.b) / (a.a * b.b - a.b * b.a);
    return x;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	cin >> n;
	for (int i = 0; i < n; i++) cin >> a[i].x >> a[i].y;
	for (int i = 0; i < n; i++)
    {
        for (int j = i + 1; j < n; j++)
        {
            for (int k = j + 1; k < n; k++)
            {
                line l1 = line_by_pnts(a[i], a[j]);
                line l2 = line_by_pnts(a[j], a[k]);
                pnt p1 = homotetion(a[j], a[i], 0.5);
                pnt p2 = homotetion(a[j], a[k], 0.5);
                l1 = perpendiculare(l1, p1);
                l2 = perpendiculare(l2, p2);
                pnt c = intersection(l1, l2);
                double x = dist(c, a[j]);
                int t = 1;
                for (int d = 0; d < n; d++)
                {
                    if (dist(a[d], c) > x) t = 0;
                }
                if (t == 1)
                {
                    ans = min(ans, x);
                }
            }
        }
    }
    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < n; j++)
        {
            pnt c = homotetion(a[i], a[j], 0.5);
            double x = dist(c, a[j]);
            int t = 1;
            for (int d = 0; d < n; d++)
            {
                if (dist(a[d], c) > x) t = 0;
            }
            if (t == 1)
            {
                ans = min(ans, x);
            }
        }
    }
    cout << fixed << setprecision(20) << sqrt(ans) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:117:42: error: 'sqrt' was not declared in this scope; did you mean 'sqr'?
  117 |     cout << fixed << setprecision(20) << sqrt(ans) << endl;
      |                                          ^~~~
      |                                          sqr
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <cstdio>

using namespace std;

int n;
double ans = 1e9;

struct pnt{
    double x, y;
};

pnt a[500];

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

double dist(pnt a, pnt b)
{
    return sqr(a.x - b.x) + sqr(a.y - b.y);
}

struct line{
    double a, b, c;
};

line line_by_pnts(pnt a, pnt b)
{
    line l;
    l.a = a.y - b.y;
    l.b = b.x - a.x;
    l.c = -l.a * a.x - l.b * a.y;
    return l;
}

line perpendiculare(line l, pnt b)
{
    line k;
    k.a = -l.b;
    k.b = l.a;
    k.c = -k.a * b.x - k.b * b.y;
    return k;
}

pnt homotetion(pnt a, pnt b, double k)
{
    pnt c;
    c.x = a.x + (b.x - a.x) * k;
    c.y = a.y + (b.y - a.y) * k;
    return c;
}

pnt intersection(line a, line b)
{
    pnt x;
    x.y = (b.c * a.a - a.c * b.a) / (a.b * b.a - a.a * b.b);
    x.x = (b.c * a.b - a.c * b.b) / (a.a * b.b - a.b * b.a);
    return x;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	cin >> n;
	for (int i = 0; i < n; i++) cin >> a[i].x >> a[i].y;
	for (int i = 0; i < n; i++)
    {
        for (int j = i + 1; j < n; j++)
        {
            for (int k = j + 1; k < n; k++)
            {
                line l1 = line_by_pnts(a[i], a[j]);
                line l2 = line_by_pnts(a[j], a[k]);
                pnt p1 = homotetion(a[j], a[i], 0.5);
                pnt p2 = homotetion(a[j], a[k], 0.5);
                l1 = perpendiculare(l1, p1);
                l2 = perpendiculare(l2, p2);
                pnt c = intersection(l1, l2);
                double x = dist(c, a[j]);
                int t = 1;
                for (int d = 0; d < n; d++)
                {
                    if (dist(a[d], c) > x) t = 0;
                }
                if (t == 1)
                {
                    ans = min(ans, x);
                }
            }
        }
    }
    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < n; j++)
        {
            pnt c = homotetion(a[i], a[j], 0.5);
            double x = dist(c, a[j]);
            int t = 1;
            for (int d = 0; d < n; d++)
            {
                if (dist(a[d], c) > x) t = 0;
            }
            if (t == 1)
            {
                ans = min(ans, x);
            }
        }
    }
	printf("%.9f", sqrt(ans));
}


Compiler output:
a.cc: In function 'int main()':
a.cc:116:24: error: 'sqrt' was not declared in this scope; did you mean 'sqr'?
  116 |         printf("%.9f", sqrt(ans));
      |                        ^~~~
      |                        sqr
Language: C++

/*
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll MOD = 1e9 + 7;
//const ll MOD = 998244353;
//const ll MOD = ;
ll mod(ll A, ll M) {return (A % M + M) % M;}
const ll INF = 1LL << 60;
template<class T> bool chmin(T& a, T b) {if (a > b) {a = b; return true;} return false;}
template<class T> bool chmax(T& a, T b) {if (a < b) {a = b; return true;} return false;}
ll divceil(ll A, ll B) {return (A + (B - 1)) / B;}
ll myctoi(char C) {return C - '0';}
char myitoc(ll N) {return '0' + N;}
#define FINALANS(A) {cout << (A) << '\n'; exit(0);}

int main()
{
  cout << fixed << setprecision(10);
  cerr << fixed << setprecision(10);

  using ld = long double;
  using pll = pair<ll, ll>;

  ll N;
  cin >> N;
  vector<pll> xy(N);
  for (ll i = 0; i < N; i++)
  {
    cin >> xy.at(i).first >> xy.at(i).second;
  }
  sort(xy.begin(), xy.end());

  ll k = 0;
  vector<pll> qs(2 * N);
  for (ll i = 0; i < N; i++)
  {
    while (true)
    {
      if (k <= 1)
        break;

      ll x0 = qs.at(k - 1).first, y0 = qs.at(k - 1).second;
      ll x1 = qs.at(k - 2).first, y1 = qs.at(k - 2).second;
      ll x2 = xy.at(i).first, y2 = xy.at(i).second;

      if ((y1 - y0) * (x2 - x1) > (y2 - y1) * (x1 - x0))
        break;

      k--;
    }
    qs.at(k++) = xy.at(i);
  }
  for (ll i = N - 2, t = k; i >= 0; i--)
  {
    while (true)
    {
      if (k <= t)
        break;

      ll x0 = qs.at(k - 1).first, y0 = qs.at(k - 1).second;
      ll x1 = qs.at(k - 2).first, y1 = qs.at(k - 2).second;
      ll x2 = xy.at(i).first, y2 = xy.at(i).second;

      if ((y1 - y0) * (x2 - x1) > (y2 - y1) * (x1 - x0))
        break;

      k--;
    }
    qs.at(k++) = xy.at(i);
  }
  qs.resize(k - 1);

  for (ll i = 0; i < N; i++)
  {
    for (ll j = i + 1; j < N; j++)
    {
      for (ll k = k + 1; k < N; k++)
      {
        ll x0 = qs.at(i).first, y0 = qs.at(i).second;
        ll x1 = qs.at(j).first, y1 = qs.at(j).second;
        ll x2 = qs.at(k).first, y2 = qs.at(k).second;
      }

      ld X, Y;
      
    }
  }
  
}

Compiler output:
a.cc:1:1: error: unterminated comment
    1 | /*
      | ^