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

#include<iostream>
#include<algorithm>
#include<iomanip>
using namespace std;
struct Point { long double px, py; };
long double norm(Point a) { return a.px*a.px + a.py*a.py; }
long double Abs(Point a, Point b) { Point C; C.px = a.px - b.px; C.py = a.py - b.py; return sqrt(norm(C)); }
int N; Point P[1000000];
int main() {
	cin >> N; long double res = 10101010101010101010101010101010101010101.0101;
	for (int i = 0; i < N; i++) { cin >> P[i].px >> P[i].py; }
	for (int i = 0; i < N; i++) {
		for (int j = i + 1; j < N; j++) {
			res = min(res, Abs(P[i], P[j]));
		}
	}
	cout << fixed << setprecision(5141919) << res << endl;
	return 0;
}

Compiler output:
a.cc: In function 'long double Abs(Point, Point)':
a.cc:7:93: error: 'sqrt' was not declared in this scope
    7 | long double Abs(Point a, Point b) { Point C; C.px = a.px - b.px; C.py = a.py - b.py; return sqrt(norm(C)); }
      |                                                                                             ^~~~
Language: C++

#include <iostream>
#include <stdio.h>
#include <map>
#include <vector>
#include <algorithm>
#include <utility>
#include <climits>
using namespace std;

typedef pair<double, double> P;

double getClosestPairVirtical(vector<P> &v, int s, int t){
    double d = INT_MAX;
    for(int i=s+1; i<t; i++){
        d = min(d, v[i].second-v[i-1].second);
    }
    return d;
}

bool inRange(double v, double l, double r){
    return l<=v && v<=l;
}

bool compare_y(P a, P b){
    return a.second < b.second;
}

double getClosestPair(vector<P> &v, int s, int t){
    if(t-s==1) return INT_MAX;
    if(v[s].first == v[t-1].first) return getClosestPairVirtical(v, s, t);
    const double mid = (v[s].first+v[t-1].first)/2;
    int midPos;
    for(midPos=s; midPos<t && v[midPos].first<mid; midPos++);
    const double d1 = getClosestPair(v, s, midPos);
    const double d2 = getClosestPair(v, midPos, t);
    double d = min(d1, d2);
    inplace_merge(v.begin()+s, v.begin()+mid, v.begin()+t, compare_y);
    vector<P> use;
    for(int i=s; i<t; i++){
        if(fabs(v[i].first-mid)>d) continue;
        for(int j=use.size()-1; j>=0; j--){
            if(fabs(v[i].second-use[j].second)>d) break;
            double dx = v[i].first-use[j].first;
            double dy = v[i].second-use[j].second;
            d = min(d, sqrt(dx*dx + dy*dy));
        }
        use.push_back(v[i]);
    }
    return d;
}

int main(){
    int n;
    double x, y;
    cin >> n;
    vector<P> v;
    for(int i=0; i<n; i++){
        P p;
        cin >> p.first >> p.second;
        v.push_back(p);
    }
    sort(v.begin(), v.end());
    cout << getClosestPair(v, 0, v.size()) << endl;
}

Compiler output:
a.cc: In function 'double getClosestPair(std::vector<std::pair<double, double> >&, int, int)':
a.cc:40:12: error: 'fabs' was not declared in this scope; did you mean 'labs'?
   40 |         if(fabs(v[i].first-mid)>d) continue;
      |            ^~~~
      |            labs
a.cc:42:16: error: 'fabs' was not declared in this scope; did you mean 'labs'?
   42 |             if(fabs(v[i].second-use[j].second)>d) break;
      |                ^~~~
      |                labs
a.cc:45:24: error: 'sqrt' was not declared in this scope
   45 |             d = min(d, sqrt(dx*dx + dy*dy));
      |                        ^~~~
Language: C++

#include <complex>
#include <vector>
#include <algorithm>
#include <cstdio>
#define sq(n) (n)*(n)
  
typedef std::pair<double, double> point_t;
typedef std::pair<point_t, point_t> points_t;
 
double distance_between(const point_t& a, const point_t& b){
	return sq(b.first-a.first)+sq(b.second-a.second);
}
 
double find_closest_brute(const std::vector<point_t>& points,int xl,int xr){
	int siz=xr-xl;
	if (siz < 2) {
		return 1e9;
	}
	auto minDistance = 1e9;
	for (auto i = xl; i < xr-1; ++i) {
		for (auto j = i + 1; j < xr; ++j) {
			auto newDistance = distance_between(points[i], points[j]);
			if (newDistance < minDistance) {
				minDistance = newDistance;
			}
		}
	}
	return minDistance;
}
 
double find_closest_optimized(
	const std::vector<point_t>& xP,
	int xl,int xr,
	const std::vector<point_t>& yP,
	int yl,int yr
){
	int xsiz=xr-xl;
	int ysiz=yr-yl;
	if (xsiz <= 8) {
		return find_closest_brute(xP,xl,xr);
	}
	if(ysiz==0)return 1e9;
	//printf("%d %d %d %d\n",xl,xr,yl,yr);
	auto xM = xP[xl+xsiz/2].first;
	auto yL = std::vector<point_t>(ysiz);
	int left = -1, right = ysiz;
	for(int i = yl; i < yr; i++){
		if (yP[i].first < xM) yL[++left] = yP[i];
		else                  yL[--right]= yP[i];
	}
	std::reverse(yL.begin()+right,yL.end());
	auto p1 = find_closest_optimized(xP,xl,xl+xsiz/2,yL,0,left+1);
	auto p2 = find_closest_optimized(xP,xl+xsiz/2,xr,yL,left+1,ysiz);
	auto minD = sqrt((p1 < p2) ? p1 : p2);
	yL.clear();
	std::copy_if(std::begin(yP), std::end(yP), std::back_inserter(yS), [&minD, &xM](const point_t& p) {
		return std::abs(xM - p.first) < minD;
	});
	auto result = minD*minD;
	for (auto i = std::begin(yS); i != (std::end(yS) - 1); ++i) {
		for (auto k = i + 1; k != std::end(yS) &&
		 ((k->second - i->second) < minD); ++k) {
			auto newDistance = distance_between(*k, *i);
			if (newDistance < result) {
				result = newDistance;
			}
		}
	}
	return result;
}
  
int main(){
	std::vector<point_t> points;
	int i=0,n;
	double x,y;
	for(scanf("%d",&n);i<n;i++){
		scanf("%lf%lf",&x,&y);
		points.emplace_back(x,y);
	}
	std::sort(std::begin(points), std::end(points), [](const point_t& a, const point_t& b) {
		return a.first < b.first;
	});
	auto xP = points;
	std::sort(std::begin(points), std::end(points), [](const point_t& a, const point_t& b) {
		return a.second < b.second;
	});
	auto yP = points;
	auto r = find_closest_optimized(xP,0,n,yP,0,n);
	printf("%.9f\n",sqrt(r));
}

Compiler output:
a.cc: In function 'double find_closest_optimized(const std::vector<std::pair<double, double> >&, int, int, const std::vector<std::pair<double, double> >&, int, int)':
a.cc:56:71: error: 'yS' was not declared in this scope; did you mean 'yL'?
   56 |         std::copy_if(std::begin(yP), std::end(yP), std::back_inserter(yS), [&minD, &xM](const point_t& p) {
      |                                                                       ^~
      |                                                                       yL
Language: C++

#include <complex>
#include <vector>
#include <algorithm>
#include <cstdio>
#define sq(n) (n)*(n)
  
typedef std::pair<double, double> point_t;
typedef std::pair<point_t, point_t> points_t;
 
double distance_between(const point_t& a, const point_t& b){
	return sq(b.first-a.first)+sq(b.second-a.second);
}
 
double find_closest_brute(const std::vector<point_t>& points,int xl,int xr){
	int siz=xr-xl;
	if (siz < 2) {
		return 1e9;
	}
	auto minDistance = 1e9;
	for (auto i = xl; i < xr-1; ++i) {
		for (auto j = i + 1; j < xr; ++j) {
			auto newDistance = distance_between(points[i], points[j]);
			if (newDistance < minDistance) {
				minDistance = newDistance;
			}
		}
	}
	return minDistance;
}
 
double find_closest_optimized(
	const std::vector<point_t>& xP,
	int xl,int xr,
	const std::vector<point_t>& yP,
	int yl,int yr
){
	int xsiz=xr-xl;
	int ysiz=yr-yl;
	if (xsiz <= 8) {
		return find_closest_brute(xP,xl,xr);
	}
	if(ysiz==0)return 1e9;
	auto xM = xP[xl+xsiz/2].first;
	auto yL = std::vector<point_t>(ysiz);
	int left = -1, right = ysiz;
	for(int i = yl; i < yr; i++){
		if (yP[i].first < xM) yL[++left] = yP[i];
		else                  yL[--right]= yP[i];
	}
	std::reverse(yL.begin()+right,yL.end());
	auto p1 = find_closest_optimized(xP,xl,xl+xsiz/2,yL,0,left+1);
	auto p2 = find_closest_optimized(xP,xl+xsiz/2,xr,yL,left+1,ysiz);
	auto minD = sqrt((p1 < p2) ? p1 : p2);
	auto yS = std::vector<point_t>();
	std::copy_if(std::begin(yP), std::end(yP), std::back_inserter(yS), [&minD, &xM](const point_t& p) {
		return std::abs(xM - p.first) < minD;
	});
	auto result = minD*minD;
	if(yS.size>=2)
	for (auto i = std::begin(yS); i != (std::end(yS) - 1); ++i) {
		for (auto k = i + 1; k != std::end(yS) &&
		 ((k->second - i->second) < minD); ++k) {
			auto newDistance = distance_between(*k, *i);
			if (newDistance < result) {
				result = newDistance;
			}
		}
	}
	return result;
}
  
int main(){
	std::vector<point_t> points;
	int i=0,n;
	double x,y;
	for(scanf("%d",&n);i<n;i++){
		scanf("%lf%lf",&x,&y);
		points.emplace_back(x,y);
	}
	std::sort(std::begin(points), std::end(points), [](const point_t& a, const point_t& b) {
		return a.first < b.first;
	});
	auto xP = points;
	std::sort(std::begin(points), std::end(points), [](const point_t& a, const point_t& b) {
		return a.second < b.second;
	});
	auto yP = points;
	auto r = find_closest_optimized(xP,0,n,yP,0,n);
	printf("%.9f\n",sqrt(r));
}

Compiler output:
a.cc: In function 'double find_closest_optimized(const std::vector<std::pair<double, double> >&, int, int, const std::vector<std::pair<double, double> >&, int, int)':
a.cc:59:15: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = std::pair<double, double>; _Alloc = std::allocator<std::pair<double, double> >; size_type = long unsigned int]' (did you forget the '()' ?)
   59 |         if(yS.size>=2)
      |            ~~~^~~~
      |                   ()
Language: C++

#include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
const ld eps=1e-9;

//// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt" > "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\b.answer"
ld getdis(const pair<ld, ld>&l, const pair<ld, ld>&r) {
	return sqrt((l.first - r.first)*(l.first - r.first) + (l.second - r.second)*(l.second - r.second));
}
ld getans(vector<pair<ld, ld>>&ps) {
	if (ps.size() == 2) {
		return getdis(ps[0], ps[1]);
	}
	else if (ps.size() <= 1) {
		return 1e18;
	}
	else {
		int n = ps.size() / 2;
		ld la = getans(vector<pair<ld, ld>>(ps.begin(), ps.begin() + ps.size() / 2));
		ld ra = getans(vector<pair<ld, ld>>(ps.begin() + ps.size() / 2, ps.end()));
		ld nans = min(la, ra);
		auto lit = lower_bound(ps.begin(), ps.end(), make_pair(ps[n].first - nans - 1, -1e18l));
		auto rit = upper_bound(ps.begin(), ps.end(), make_pair(ps[n].first + nans + 1,  1e18l));
		for (auto a = lit; a != rit; ++a) {
			for (auto b = next(a); b != rit; ++b) {
				nans = min(nans, getdis(*a, *b));
			}
		}
		return nans;
	}
}

int main() {
	int N; cin >> N;
	vector<pair<ld, ld>>ps;
	for (int i = 0; i < N; ++i) {
		ld x, y; cin >> x >> y;
		ps.emplace_back(x, y);
	}
	sort(ps.begin(), ps.end());
	ld ans = getans(ps);
	cout <<setprecision(22)<<fixed<< ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'ld getans(std::vector<std::pair<long double, long double> >&)':
a.cc:24:32: error: cannot bind non-const lvalue reference of type 'std::vector<std::pair<long double, long double> >&' to an rvalue of type 'std::vector<std::pair<long double, long double> >'
   24 |                 ld la = getans(vector<pair<ld, ld>>(ps.begin(), ps.begin() + ps.size() / 2));
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:15:32: note:   initializing argument 1 of 'ld getans(std::vector<std::pair<long double, long double> >&)'
   15 | ld getans(vector<pair<ld, ld>>&ps) {
      |           ~~~~~~~~~~~~~~~~~~~~~^~
a.cc:25:32: error: cannot bind non-const lvalue reference of type 'std::vector<std::pair<long double, long double> >&' to an rvalue of type 'std::vector<std::pair<long double, long double> >'
   25 |                 ld ra = getans(vector<pair<ld, ld>>(ps.begin() + ps.size() / 2, ps.end()));
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:15:32: note:   initializing argument 1 of 'ld getans(std::vector<std::pair<long double, long double> >&)'
   15 | ld getans(vector<pair<ld, ld>>&ps) {
      |           ~~~~~~~~~~~~~~~~~~~~~^~
Language: C++

#include <cmath>            // fabs(), sqrt()
#include <vector>
#include <utility>          // pair
#include <algorithm>        // min(), sort(), inplace_merge()

using namespace std;
typedef pair<double, double> P; // first ??? x ??§?¨????second ??? y ??§?¨?

static const int MAX_N = 100000;
static const int INF = 1000000000;

P A[MAX_N];
int N;

bool
cmp_func(P a, P b)
{
	return a.second < b.second;
}

double
closest_pair(P* a, int n)
{
	if (n <= 1)
		return INF;

	int m = n / 2;
	double x = a[m].first;
	double d = min(closest_pair(a, m), closest_pair(a + m, n - m)); // (1)
	inplace_merge(a, a + m, a + n, cmp_func); // ??????????????????????????????????????????
	// ??????????????§ a ??? y ??§?¨??????????????????£?????????

	//x (2')
	vector<P> b; // ??´??????????????¢ d ????????????????????\????????????
	for (int i = 0; i < n; ++i)
	{
		if (fabs(a[i].first - x) >= d)
			continue;

		// b ?????\??£?????????????????????????°??????????y ??§?¨?????????? d ??\?????????????????§????????????
		for (unsigned int j = 0; j < b.size(); ++j)
		{
			double dx = a[i].first - b[b.size() - j - 1].first;
			double dy = a[i].second - b[b.size() - j - 1].second;
			if (dy >= d)
				break;

			d = min(d, sqrt(dx * dx + dy * dy));
		}

		b.push_back(a[i]);
	}

	return d;
}

int
main(int argc, char** argv)
{
	scanf("%d", &N);
	for (int i = 0; i < N; ++i)
		scanf("%lf %lf", &A[i].first, &A[i].second);

	sort(A, A + N);
	printf("%.10f\n", closest_pair(A, N));
	return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:60:9: error: 'scanf' was not declared in this scope
   60 |         scanf("%d", &N);
      |         ^~~~~
a.cc:65:9: error: 'printf' was not declared in this scope
   65 |         printf("%.10f\n", closest_pair(A, N));
      |         ^~~~~~
a.cc:5:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    4 | #include <algorithm>        // min(), sort(), inplace_merge()
  +++ |+#include <cstdio>
    5 |
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;(i)<(n);++(i))
using namespace std;

// Description: ????????????
// Verifyed: various problem 
using namespace placeholders;
using R=long double;
const R EPS=1e-9L; // [-1000,1000]->EPS=1e-8 [-10000,10000]->EPS=1e-7
inline int sgn(const R& r){return(r > EPS)-(r < -EPS);}
inline R sq(R x){return sqrt(max(x,0.0L));}

const R INF = 1E40L;
const R PI = acos(-1.0L);
using P=complex<R>;
using L=struct{P s,t;};
using VP=vector<P>;
using C=struct{P c;R r;};

auto& operator >> (istream& is,P& p){ R x,y; is >> x >> y,p=P(x,y); return is;}
auto& operator << (ostream& os,P& p){ os << real(p) << " " << imag(p); return os;}

inline R dot(P o,P a,P b){return real(conj(a-o)*(b-o));}
inline R det(P o,P a,P b){return imag(conj(a-o)*(b-o));}
inline P vec(L l){return l.t-l.s;}
auto sdot = bind(sgn,bind(dot,_1,_2,_3));
auto sdet = bind(sgn,bind(det,_1,_2,_3));

//projection verify AOJ CGL_1_A
P proj(L l,P p){ R u=real((p-l.s)/vec(l)); return (1-u)*l.s+u*l.t;}

// closest point pair Verify AOJ CGL_5_A
R cpp(VP a){
	const int n=a.size(),m=n/2;
	if(n<=1) return INF;
	
	auto cmp_x=[](P a,P b)->bool{
		int sr = sgn(real(a-b)), si = sgn(imag(a-b));
		return sr ? sr < 0 :si < 0;
	};
	
	sort(begin(a),end(a),cmp_x);
	
	VP b(begin(a),begin(a)+m),c(begin(a)+m,end(a));
	R x=real(a[m]),d=min(cpp(b),cpp(c));
	
	auto cmp_y=[](P a,P b)->bool{
		int sr = sgn(real(a-b)), si = sgn(imag(a-b));
		return si ? si < 0 :sr < 0;
	};

	sort(begin(a),end(a),cmp_y);
	deque<P> e;

	for(auto &p:a){
		if(abs(real(p)-x)>=d) continue;	
		for(auto &q:e){
			if(imag(p-q)>=d) break;
			chmin(d,abs(p-q));
		}
		e.push_back(p);
	}
	return d;
}

int main(void){
	int n;
	cin >> n;
	VP pol;
	rep(i,n){
		P p;
		cin >> p;
		pol.push_back(p);
	}
	cout.precision(20);
	cout << fixed << cpp(pol) << endl;
	return 0;
}

Compiler output:
a.cc: In function 'R cpp(VP)':
a.cc:59:25: error: 'chmin' was not declared in this scope
   59 |                         chmin(d,abs(p-q));
      |                         ^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define pt pair<double,double>
#define x first
#define y second
const double INF=1e7;
pt p[100010];
double dist(pt a,pt b)
{return sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y));}
bool cmpy(pt a,pt b){return a.y<b.y;}
double closest(int l,int r)
{
  if(l==r) return INF;
  int mid=(l+r)/2,pp=l,qq=mid+1;
  double midline=p[mid].x;
  double ret=min(closest(l,mid),closest(mid+1,r));
  vector<pt> slab;
  inplace_merge(p+l,p+mid+1,p+r+1,cmp);
  for(int i=l;i<=r;i++)
    if(abs(p[i].x-midline)<ret)
      slab.push_back(p[i]);
  for(int i=0;i<slab.size();i++)
    for(int j=i+1;j<slab.size() && abs(slab[i].y-slab[j].y)<ret;j++)
      ret=min(ret,dist(slab[i],slab[j]));
  return ret;
}
int main()
{
  int n;
  cin>>n;
  for(int i=1;i<=n;i++)
    cin>>p[i].x>>p[i].y;
  sort(p+1,p+n+1);
  cout<<fixed<<closest(1,n)<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'double closest(int, int)':
a.cc:18:35: error: 'cmp' was not declared in this scope; did you mean 'cmpy'?
   18 |   inplace_merge(p+l,p+mid+1,p+r+1,cmp);
      |                                   ^~~
      |                                   cmpy
Language: C++

#include <iostream>
#include <iomanip>
#include <cmath>

using namespace std;
using P = pair<double, double>;

int main() {

    int n;
    cin >> n;

    P p[n];

    for (int i = 0; i < n; i++) {
        double x, y;
        cin >> x >> y;
        p[i] = make_pair(x, y);
    }

    sort(p, p + n);

    double ans = 100000;

    for (int i = 0; i < n - 1; i++) {
        for (int j = i + 1; j < n; j++) {
            P p1, p2;
            p1 = p[i];
            p2 = p[j];
            double dx, dy;
            dx = (p1.first - p2.first) * (p1.first - p2.first);
            dy = (p1.second - p2.second) * (p1.second - p2.second);
            if (dx > ans) break;
            ans = min(ans, dx + dy);
        }
    }

    cout << fixed << setprecision(7) << sqrt(ans) << endl;
}


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

import sys
import math

def solve(a: list):
    length = len(a)
    if length <= 3:
        return min((p1[0]-p2[0])**2+(p1[1]-p2[1])**2 for p1, p2 in zip(a, a[1:]))

    med = length//2
    x_l, x_r = a[:med], a[med:]
    delta = min(solve(x_l), solve(x_r))
    median_x = a[med][0]
    m_a = []
        
    for p in x_l[::-1]:
        if p[0] < median_x-delta:
            break
        m_a.append(p)
    m_a.reverse()
    for p in x_r:
        if p[0] > median_x+delta:
            break
        m_a.append(p)

    for i, (x1, y1) in enumerate(m_a):
        to_y = y1 + delta
        for j, (x2, y2) in enumerate(m_a[i+1:]):
            if y2 > to_y:
                break
            delta = min(delta, (x1-x2)**2+(y1-y2)**2)

    return delta

if __name__ == "__main__":
    N = int(input())
    m = 1000000
    a = sorted([tuple(map(lambda s: int(float(s)*m), l.split())) for l in sys.stdin.readlines()])
    print(math.sqrt(solve(a)/(m**2)))


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include <cstdio>
#include <cstdlib>
int n,i,j,m,z;
double x[100001],y[100001];
main(){scanf("%d",&n);for(i=0;i<n;i++)scanf("%lf%lf",x+i,y+i);m=999999;for(i=0;i<n;i++)for(j=i+1;j<n;j++)if(m>(z=(x[j]-x[i])*(x[j]-x[i])+(y[j]-y[i])*(y[j]-y[i])))m=z;printf("%.9f\n",sqrt(m));}}

Compiler output:
a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    5 | main(){scanf("%d",&n);for(i=0;i<n;i++)scanf("%lf%lf",x+i,y+i);m=999999;for(i=0;i<n;i++)for(j=i+1;j<n;j++)if(m>(z=(x[j]-x[i])*(x[j]-x[i])+(y[j]-y[i])*(y[j]-y[i])))m=z;printf("%.9f\n",sqrt(m));}}
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:183: error: 'sqrt' was not declared in this scope
    5 | main(){scanf("%d",&n);for(i=0;i<n;i++)scanf("%lf%lf",x+i,y+i);m=999999;for(i=0;i<n;i++)for(j=i+1;j<n;j++)if(m>(z=(x[j]-x[i])*(x[j]-x[i])+(y[j]-y[i])*(y[j]-y[i])))m=z;printf("%.9f\n",sqrt(m));}}
      |                                                                                                                                                                                       ^~~~
a.cc: At global scope:
a.cc:5:193: error: expected declaration before '}' token
    5 | main(){scanf("%d",&n);for(i=0;i<n;i++)scanf("%lf%lf",x+i,y+i);m=999999;for(i=0;i<n;i++)for(j=i+1;j<n;j++)if(m>(z=(x[j]-x[i])*(x[j]-x[i])+(y[j]-y[i])*(y[j]-y[i])))m=z;printf("%.9f\n",sqrt(m));}}
      |                                                                                                                                                                                                 ^
Language: Java


public class week01_A {
	public static void main(String args[]){
		int cx1, cy1, r1;
		int cx2, cy2, r2;
		
		if(args.length != 0){
			cx1 = Integer.valueOf(args[0]);
			cy1 = Integer.valueOf(args[1]);
			r1 = Integer.valueOf(args[2]);
			cx2 = Integer.valueOf(args[3]);
			cy2 = Integer.valueOf(args[4]);
			r2 = Integer.valueOf(args[5]);
			
			int l = (int) Math.sqrt(Math.pow(cx1 - cx2, 2) + Math.pow(cy1 - cy2, 2));
			if(l > (r1+r2)) 
				System.out.println("4");
			else if(l == (r1+r2)) 
				System.out.println("3");
			else if(l < (r1+r2)) {
				int maxr = r1;
				int minr = r2;
				if(r1 < r2){
					maxr = r2;
					minr = r1;
				}
				if(l > (maxr-minr))
					System.out.println("2");
				else if(l == (maxr-minr))
					System.out.println("1");
				else if(l < (maxr-minr))
					System.out.println("0");
			}
		}
		else System.out.println("Input doesn't be exist");
	}	
}



Compiler output:
Main.java:2: error: class week01_A is public, should be declared in a file named week01_A.java
public class week01_A {
       ^
1 error
Language: Java

import java.util.Scanner;

public class problemA {

  public static void main(String[] args){
    int c1x=0, c1y=0, c1r=0;
    int c2x=0, c2y=0, c2r=0;
    int length = 0;//length of between center coordinate of c1 and c2
    int large = 0, small = 0;

    Scanner scan = new Scanner(System.in);
    c1x = scan.nextInt();
    c1y = scan.nextInt();
    c1r = scan.nextInt();

    c2x = scan.nextInt();
    c2y = scan.nextInt();
    c2r = scan.nextInt();

    large = c1r;
    small = c2r;
    if(large < small){
      large = c2r;
      small = c1r;
    }

    length = (int)(Math.sqrt((c2x-c1x)*(c2x-c1x) + (c2y-c1y)*(c2y-c1y)));

    if(length > (c1r + c2r)) System.out.println("4");
    else if (length < (c1r + c2r)){
        if(large == (length + small)) System.out.println("1");
        else if(large > (length + small))System.out.println("0");
        else System.out.println("2");
    }
    else System.out.println("3");
  }
}



Compiler output:
Main.java:3: error: class problemA is public, should be declared in a file named problemA.java
public class problemA {
       ^
1 error
Language: Java


public class week01_A {
	public static void main(String args[]){
		int cx1, cy1, r1;
		int cx2, cy2, r2;
		
		if(args.length != 0){
			cx1 = Integer.valueOf(args[0]);
			cy1 = Integer.valueOf(args[1]);
			r1 = Integer.valueOf(args[2]);
			cx2 = Integer.valueOf(args[3]);
			cy2 = Integer.valueOf(args[4]);
			r2 = Integer.valueOf(args[5]);
			
			int l = (int)(Math.pow(cx1 - cx2, 2) + Math.pow(cy1 - cy2, 2));
			int rlen = r1+r2;
			int revlen = r1 - r2;
			if(l > rlen*rlen) 
				System.out.println("4");
			else if(l == rlen*rlen) 
				System.out.println("3");
			else if(l < rlen*rlen) {
				if(l > revlen*revlen)
					System.out.println("2");
				else if(l == revlen*revlen)
					System.out.println("1");
				else if(l < revlen*revlen)
					System.out.println("0");
			}
		}
		else System.out.println("Input doesn't be exist");
	}	
}



Compiler output:
Main.java:2: error: class week01_A is public, should be declared in a file named week01_A.java
public class week01_A {
       ^
1 error
Language: Java

public class Main {
	public static void main(String args[]){
		int cx1, cy1, r1;
		int cx2, cy2, r2;
		
		if(args.length != 0){
			cx1 = Integer.valueOf(args[0]);
			cy1 = Integer.valueOf(args[1]);
			r1 = Integer.valueOf(args[2]);
			cx2 = Integer.valueOf(args[3]);
			cy2 = Integer.valueOf(args[4]);
			r2 = Integer.valueOf(args[5]);
			
			int l = (int)(Math.pow(cx1 - cx2, 2) + Math.pow(cy1 - cy2, 2));
			int rlen = r1+r2;
			int revlen = r1 - r2;
			else if(l > rlen*rlen) 
				System.out.println("4");
			else if(l == rlen*rlen) 
				System.out.println("3");
			else if(l < rlen*rlen) {
				if(l > revlen*revlen)
					System.out.println("2");
				else if(l == revlen*revlen)
					System.out.println("1");
				else if(l < revlen*revlen)
					System.out.println("0");
			}
		}
		else System.out.println("Input doesn't be exist");
	}	
}



Compiler output:
Main.java:17: error: 'else' without 'if'
			else if(l > rlen*rlen) 
			^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class week01_A {
	public static void main(String args[]) throws IOException{
		BufferedReader buffer = new BufferedReader(new InputStreamReader(System.in));

		double cx1, cy1, r1;
		double cx2, cy2, r2;
		
		//if(args.length != 0){
			cx1 = Double.valueOf(buffer.read());
			cy1 = Double.valueOf(buffer.read());
			r1 = Double.valueOf(buffer.read());
			cx2 = Double.valueOf(buffer.read());
			cy2 = Double.valueOf(buffer.read());
			r2 = Double.valueOf(buffer.read());
			
			double l = (Math.pow(cx1 - cx2, 2) + Math.pow(cy1 - cy2, 2));
			double rlen = r1+r2;
			double revlen = r1 - r2;
			if(l > rlen*rlen) 
				System.out.println("4");
			else if(l == rlen*rlen) 
				System.out.println("3");
			else if(l < rlen*rlen) {
				if(l > revlen*revlen)
					System.out.println("2");
				else if(l == revlen*revlen)
					System.out.println("1");
				else if(l < revlen*revlen)
					System.out.println("0");
			}
		//}
		//else System.out.println("Input doesn't be exist");
	}	
}




Compiler output:
Main.java:5: error: class week01_A is public, should be declared in a file named week01_A.java
public class week01_A {
       ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
 
public class Intersection {
  public static void main(String[] args) {
    try {
      BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in));

      String line1;
      line1 = stdReader.readLine();
      String[] data1 = line1.split(" ", 0);
      double cx1 = Double.parseDouble(data1[0]);
      double cy1 = Double.parseDouble(data1[1]);
      double r1 = Double.parseDouble(data1[2]);

      String line2;
      line2 = stdReader.readLine();
      String[] data2 = line2.split(" ", 0);
      double cx2 = Double.parseDouble(data2[0]);
      double cy2 = Double.parseDouble(data2[1]);
      double r2 = Double.parseDouble(data2[2]);

      Double distance = new Double( Math.sqrt(Math.pow(cx1-cx2, 2) + Math.pow(cy1-cy2, 2)) );
      Double maxr = Math.max(r1, r2);
      Double minr = Math.min(r1, r2);

      switch (distance.compareTo(r1+r2)){
        case 1:
          System.out.println(4);
          break;

        case 0:
          System.out.println(3);
          break;

        case -1:
          switch (maxr.compareTo(distance+minr)){
            case -1:
              System.out.println(2);
              break;
            case 0:
              System.out.println(1);
              break;
            case 1:
              System.out.println(0);
              break;
          }
          break;

      }

      stdReader.close();
    } catch (Exception e) {
      e.getStackTrace();
      System.exit(-1); // プログラムを終了
    }
  }
}



Compiler output:
Main.java:4: error: class Intersection is public, should be declared in a file named Intersection.java
public class Intersection {
       ^
Main.java:23: warning: [removal] Double(double) in Double has been deprecated and marked for removal
      Double distance = new Double( Math.sqrt(Math.pow(cx1-cx2, 2) + Math.pow(cy1-cy2, 2)) );
                        ^
1 error
1 warning
Language: Java

import java.util.Scanner;

public class problemA{

  public static void main(String[] args){
    int c1x=0, c1y=0, c1r=0;
    int c2x=0, c2y=0, c2r=0;
    int length = 0;//length of between center coordinate of c1 and c2
    int large = 0, small = 0;

    Scanner scan = new Scanner(System.in);
    c1x = scan.nextInt();
    c1y = scan.nextInt();
    c1r = scan.nextInt();

    c2x = scan.nextInt();
    c2y = scan.nextInt();
    c2r = scan.nextInt();

    large = c1r;
    small = c2r;
    if(large < small){
      large = c2r;
      small = c1r;
    }

    length = (int)(Math.sqrt((c2x-c1x)*(c2x-c1x) + (c2y-c1y)*(c2y-c1y)));

    if(length > (c1r + c2r)) System.out.println("4");
    else if (length < (c1r + c2r)){
        if(large == (length + small)) System.out.println("1");
        else if(large > (length + small))System.out.println("0");
        else System.out.println("2");
    }
    else System.out.println("3");
  }
}



Compiler output:
Main.java:3: error: class problemA is public, should be declared in a file named problemA.java
public class problemA{
       ^
1 error
Language: Java

import java.io.*;

public class ProblemA {
  public static void main(String[] args) throws IOException {
    InputStreamReader is = new InputStreamReader(System.in);
    BufferedReader br = new BufferedReader(is);

    String c1Line = br.readLine();
    String c2Line = br.readLine();

    String[] c1Array = c1Line.split(" ", 0);
    String[] c2Array = c2Line.split(" ", 0);

    int c1x = Integer.parseInt(c1Array[0]);
    int c1y = Integer.parseInt(c1Array[1]);
    int c1r = Integer.parseInt(c1Array[2]);

    int c2x = Integer.parseInt(c2Array[0]);
    int c2y = Integer.parseInt(c2Array[1]);
    int c2r = Integer.parseInt(c2Array[2]);

    int diffX = Math.abs(c1x - c2x);
    int diffY = Math.abs(c1y - c2y);
    int xyR = c1r + c2r;
    int right1X = c1x + c1r;
    int left1X = c1x - c1r;
    int right2X = c2x + c2r;
    int left2X = c2x - c2r;

    int top1Y = c1y + c1r;
    int bottom1Y = c1y - c1r;
    int top2Y = c2y + c2r;
    int bottom2Y = c2y - c2r;

    if(c1x == c2x) {
      if(diffY == xyR) { //外接
        System.out.println(3);
      } else if(diffY > xyR) { // 離れ
        System.out.println(4);
      } else {
        if(((top1Y < top2Y) && (bottom1Y > bottom2Y)) ||
        ((top1Y > top2Y) && (bottom1Y < bottom2Y))) { // 内包
          System.out.println(0);
        } else if(((top1Y < top2Y) || (bottom1Y > bottom2Y)) &&
        ((top1Y > top2Y) || (bottom1Y < bottom2Y))) { // 内接
          System.out.println(1);
        } else System.out.println(2); // 交わる
      }
    } else if(c1y == c2y) {
      if(diffX == xyR) { //外接
        System.out.println(3);
      } else if(diffX > xyR) { // 離れ
        System.out.println(4);
      } else {
        if(((right1X < right2X) && (left1X > left2X)) ||
        ((right1X > right2X) && (left1X < left2X))) { // 内包
          System.out.println(0);
        } else if(((right1X <= right2X) || (left1X <= left2X)) &&
        ((right1X >= right2X) || (left1X >= left2X))) { // 内接
          System.out.println(1);
        } else System.out.println(2); // 交わる
      }
    } else if((c1x != c2x) || (c1y != c2y)) {
      double d = Math.sqrt(diffX*diffX + diffY*diffY);
      if(d > xyR) { //離れ
        System.out.println(4);
      } else {
        if((((right1X < right2X) && (left1X > left2X)) && ((top1Y < top2Y) && (bottom1Y > bottom2Y))) ||
        (((right1X > right2X) && (left1X < left2X)) && ((top1Y > top2Y) && (bottom1Y < bottom2Y)))) { // 内包
          System.out.println(0);
        } else if((((right1X <= right2X) || (left1X >= left2X)) && ((top1Y <= top2Y) || (bottom1Y >= bottom2Y))) ||
        (((right1X >= right2X) || (left1X <= left2X)) && ((top1Y >= top2Y) || (bottom1Y <= bottom2Y)))) { // 内接
          System.out.println(1);
        } else System.out.println(2); // 交わる
      }
    }
  }
}



Compiler output:
Main.java:3: error: class ProblemA is public, should be declared in a file named ProblemA.java
public class ProblemA {
       ^
1 error
Language: Java

import java.util.Scanner;

public class pA{

  public static void main(String[] args){
    int c1x=0, c1y=0, c1r=0;
    int c2x=0, c2y=0, c2r=0;
    int length = 0;//length of between center coordinate of c1 and c2
    int large = 0, small = 0;

    Scanner scan = new Scanner(System.in);
    c1x = scan.nextInt();
    c1y = scan.nextInt();
    c1r = scan.nextInt();

    c2x = scan.nextInt();
    c2y = scan.nextInt();
    c2r = scan.nextInt();

    large = c1r;
    small = c2r;
    if(large < small){
      large = c2r;
      small = c1r;
    }

    length = (int)(Math.sqrt((c2x-c1x)*(c2x-c1x) + (c2y-c1y)*(c2y-c1y)));

    if(length > (c1r + c2r)) System.out.println("4");
    else if (length < (c1r + c2r)){
        if(large == (length + small)) System.out.println("1");
        else if(large > (length + small))System.out.println("0");
        else System.out.println("2");
    }
    else System.out.println("3");
  }
}



Compiler output:
Main.java:3: error: class pA is public, should be declared in a file named pA.java
public class pA{
       ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;

public class week01_A {

		public static void main(String args[]) throws IOException{
			Scanner scan = new Scanner(System.in);

			double cx1, cy1, r1;
			double cx2, cy2, r2;
			
			//if(args.length != 0){
				cx1 = scan.nextDouble();
				cy1 = scan.nextDouble();
				r1 = scan.nextDouble();
				cx2 = scan.nextDouble();
				cy2 = scan.nextDouble();
				r2 = scan.nextDouble();
				
				double l = (Math.pow(cx1 - cx2, 2) + Math.pow(cy1 - cy2, 2));
				double rlen = r1+r2;
				double revlen = r1 - r2;
				if(l > rlen*rlen) 
					System.out.println("4");
				else if(l == rlen*rlen) 
					System.out.println("3");
				else if(l < rlen*rlen) {
					if(l > revlen*revlen)
						System.out.println("2");
					else if(l == revlen*revlen)
						System.out.println("1");
					else if(l < revlen*revlen)
						System.out.println("0");
				}
			//}
				scan.close();
			//else System.out.println("Input doesn't be exist");
		}	
	}


Compiler output:
Main.java:6: error: class week01_A is public, should be declared in a file named week01_A.java
public class week01_A {
       ^
1 error
Language: C

#include <stdio.h>
#include <math.h>
int main(int argc, const char * argv[]) {
    using namespace std;

    int c1x, c1y, c1r, c2x, c2y, c2r;
    scanf("%d %d %d", &c1x, &c1y, &c1r);
    scanf("%d %d %d", &c2x, &c2y, &c2r);

    if(c1r<c2r){
        if(sqrt(pow(c1x-c2x,2)+pow(c1y-c2y,2)) > c1r + c2r) printf("4");
        else if(sqrt(pow(c1x-c2x,2)+pow(c1y-c2y,2)) == c1r + c2r) printf("3");
        else if((c2r-c1r<sqrt(pow(c1x-c2x,2)+pow(c1y-c2y,2))) && (sqrt(pow(c1x-c2x,2)+pow(c1y-c2y,2)) < c1r + c2r)) printf("2");
        else if(sqrt(pow(c1x-c2x,2)+pow(c1y-c2y,2)) == c2r-c1r) printf("1");
        else if(sqrt(pow(c1x-c2x,2)+pow(c1y-c2y,2)) < c2r-c1r) printf("0");


    }

    else{
        if(sqrt(pow(c1x-c2x,2)+pow(c1y-c2y,2)) > c1r + c2r) printf("4");
        else if(sqrt(pow(c1x-c2x,2)+pow(c1y-c2y,2)) == c1r + c2r) printf("3");
        else if(((c1r-c2r<sqrt(pow(c1x-c2x,2)+pow(c1y-c2y,2))) && (sqrt(pow(c1x-c2x,2)+pow(c1y-c2y,2)) < c1r + c2r))) printf("2");
        else if(sqrt(pow(c1x-c2x,2)+pow(c1y-c2y,2)) == c1r-c2r) printf("1");
        else if(sqrt(pow(c1x-c2x,2)+pow(c1y-c2y,2)) < c1r-c2r) printf("0");
    }
}




Compiler output:
main.c: In function 'main':
main.c:4:5: error: unknown type name 'using'
    4 |     using namespace std;
      |     ^~~~~
main.c:4:21: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    4 |     using namespace std;
      |                     ^~~
Language: C++

#include<iostream>
#include<cmath>
using namespace std;
struct Circle { double x, y, r; };
int main() {
    Circle p, q;
    cin >> p.x >> p.y >> p.r;
    cin >> q.x >> q.y >> q.r;
    double double dist = sqrt((p.x - q.x)*(p.x - q.x) + (p.y - q.y)*(p.y - q.y));
    if (dist > p.r + q.r)cout << "4" << endl;
    else if (dist == p.r + q.r) {
        cout << "3" << endl;
    }
    else if (p.r <= q.r) {
        if (p.r + dist == q.r)cout << "1" << endl;
        if (p.r + dist < q.r)cout << "0" << endl;
        if (p.r + dist > q.r)cout << "2" << endl;
    }
    else {
        if (q.r + dist == p.r)cout << "1" << endl;
        if (q.r + dist < p.r)cout << "0" << endl;
        if (q.r + dist > p.r)cout << "2" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: two or more data types in declaration of 'dist'
    9 |     double double dist = sqrt((p.x - q.x)*(p.x - q.x) + (p.y - q.y)*(p.y - q.y));
      |     ^~~~~~
a.cc:10:9: error: 'dist' was not declared in this scope
   10 |     if (dist > p.r + q.r)cout << "4" << endl;
      |         ^~~~
Language: C++

from math import sqrt

x1, y1, r1 = map(float, input().split())
x2, y2, r2 = map(float, input().split())

d = sqrt((x1 - x2)**2 + (y1 - y2)**2)
g = max(r1 - r2, r2 - r1)

if d <  g:
    print(0)

if d == g:
    print(1)

if d >  g:
    if d <  r1 + r2: print(2)
    if d == r1 + r2: print(3)
    if d >  r1 + r2: print(4)


Compiler output:
a.cc:1:1: error: 'from' does not name a type
    1 | from math import sqrt
      | ^~~~
Language: C++

#include<iostream>
#include<queue>
#include<vector>

#define MAX 100000
#define INF INT_MAX
#define NO 0
#define WENT 1

using namespace std;

void Dijkstra(void);

int V, E, r;
vector< vector<pair<int,int> > >  v;
vector<int> cost, visited;


int main() {
  int s, t, d;

  cin >> V >> E >> r;
  v.resize(V);

  for(int i=0; i<E; i++) {
    cin >> s >> t >> d;
    v[s].push_back(make_pair(t,d)); //s番目〜t番目のコストはd                                                    
   }

  //cout << 'a' << endl;                                                                                         
  Dijkstra();

  //cout << "b" << endl;                                                                                         

  for(int i=0; i<V; i++) {
    if(visited[i] == WENT) cout << cost[i] << endl;
    else cout << "INF" << endl;
  }

  return 0;
}


void Dijkstra() {                                                                                                                                                  
  int x, y, z;
  priority_queue< pair<int,int> , vector< pair<int,int> >, greater< pair<int, int> > > p;//greaterで小さい順に取り出せる                                                                                    

  cost.resize(V);
  visited.resize(V);

  for(int i=0;i<V;i++){
    cost[i]=INF;
    visited[i] = NO;
  }
  cost[r] = 0;   //startのコストを０に                                                                                                                                                                      

  p.push(make_pair(0,r));//startのrはコスト０                                                                                                                                                               

  while(!p.empty()) {
    x=p.top().second;                                                                                                                                       
    p.pop();

    visited[x] = WENT;

    for(int i=0; i<v[x].size(); i++) {
      y = v[x][i].first;
      z = v[x][i].second;//y：edge先のノード、z：x~yへのコスト                                                                                                                                              

      if(visited[y] == NO)                                                                                                                                                 
        if(cost[y] > cost[x] + z) {                                                                                                                
          cost[y] = cost[x] + z;
          p.push(make_pair(cost[y],y));
        }
    }
  }
}


Compiler output:
a.cc: In function 'void Dijkstra()':
a.cc:6:13: error: 'INT_MAX' was not declared in this scope
    6 | #define INF INT_MAX
      |             ^~~~~~~
a.cc:52:13: note: in expansion of macro 'INF'
   52 |     cost[i]=INF;
      |             ^~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    2 | #include<queue>
  +++ |+#include <climits>
    3 | #include<vector>
Language: C

#include<stdio.h>
#include<math.h>
void cplc(int p0[2],int p1[2],int p2[2],int r,double s[2],double t[2]){
  int x1=p1[0]-p0[0],y1=p1[1]-p0[1],x2=p2[0]-p0[0],y2=p2[1]-p0[1];
  int a=x1*x1+y1*y1,b=x1*x2+y1*y2,c=x2*x2+y2*y2-r*r;
  s[0]=p0[0]+x1*(b+sqrt(b*b-a*c))/a;
  s[1]=p0[1]+y1*(b+sqrt(b*b-a*c))/a;
  t[0]=p0[0]+x1*(b-sqrt(b*b-a*c))/a;
  t[1]=p0[1]+y1*(b-sqrt(b*b-a*c))/a;
}
int main(){
  int p[4][2],n,i,r;
  double a[2][2];
  scanf("%d %d %d %d",&p[2][0],&p[2][1],&r,&n);
  while(n--){
    for(i=0;i<4;i++)scanf("%d",&p[i/2][i%2]);
    cplc(p[0],p[1],p[2],r,a[0],a[1]);
    if(a[0][0]<a[1][0]||fabs(a[0][0]-a[1][0])<0.00000001&&a[0][1]<a[1][1]){
      printf("%.9f %.9f %.9f %.9f\n",a[0][0],a[0][1],a[1][0],a[1][1]);
    }#include<stdio.h>
#include<math.h>
void cplc(int p0[2],int p1[2],int p2[2],int r,double s[2],double t[2]){
  int x1=p1[0]-p0[0],y1=p1[1]-p0[1],x2=p2[0]-p0[0],y2=p2[1]-p0[1];
  int a=x1*x1+y1*y1,b=x1*x2+y1*y2,c=x2*x2+y2*y2-r*r;
  s[0]=p0[0]+x1*(b+sqrt(b*b-a*c))/a;
  s[1]=p0[1]+y1*(b+sqrt(b*b-a*c))/a;
  t[0]=p0[0]+x1*(b-sqrt(b*b-a*c))/a;
  t[1]=p0[1]+y1*(b-sqrt(b*b-a*c))/a;
}
int main(){
  int p[4][2],n,i,r;
  double a[2][2];
  scanf("%d %d %d %d",&p[2][0],&p[2][1],&r,&n);
  while(n--){
    for(i=0;i<4;i++)scanf("%d",&p[i/2][i%2]);
    cplc(p[0],p[1],p[2],r,a[0],a[1]);
    if(a[0][0]<a[1][0]||fabs(a[0][0]-a[1][0])<0.00000001&&a[0][1]<a[1][1]){
      printf("%.9f %.9f %.9f %.9f\n",a[0][0],a[0][1],a[1][0],a[1][1]);
    }
    else printf("%.9f %.9f %.9f %.9f\n",a[1][0],a[1][1],a[0][0],a[0][1]);
  }
  return 0;
}

    else printf("%.9f %.9f %.9f %.9f\n",a[1][0],a[1][1],a[0][0],a[0][1]);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:6: error: stray '#' in program
   20 |     }#include<stdio.h>
      |      ^
main.c:20:7: error: 'include' undeclared (first use in this function)
   20 |     }#include<stdio.h>
      |       ^~~~~~~
main.c:20:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:20:15: error: 'stdio' undeclared (first use in this function); did you mean 'stdin'?
   20 |     }#include<stdio.h>
      |               ^~~~~
      |               stdin
main.c:22:1: error: expected expression before 'void'
   22 | void cplc(int p0[2],int p1[2],int p2[2],int r,double s[2],double t[2]){
      | ^~~~
Language: C++

#include <iostream>

#include <complex>
#include <vector>
#include <cmath>
#include <utility>
#include <cassert>

const double EPS=1e-10;

#define equals(a, b) (fabs((a)-(b))<EPS)
#define X real()
#define Y imag()

using namespace std;

typedef complex<double> Point;
typedef complex<double> Vector;

struct Segment {
    Point p1, p2;
};
typedef Segment Line;

struct Circle {
    Point c;
    double r;
    Circle(Point c=Point(), double r=0.0) :
        c(c),r(r){}
};

typedef vector<Point> Polygon;

double dot(Vector a, Vector b) {
    return a.X*b.X + a.Y*b.Y;
}

double cross(Vector a,Vector b) {
    return a.X*b.Y - a.Y*b.X;
}

Point project(Segment s, Point p) {
    Vector base = s.p2-s.p1;
    double r=dot(p-s.p1,base) / norm(base);
    return s.p1+base*r;
}

Point reflect(Segment s, Point p) {
    return p+(project(s,p)-p)*2.0;
}

enum CCW {
    COUNTER_CLOCKWISE=1,
    CLOCKWISE=-1,
    ONLINE_BACK=2,
    ONLINE_FRONT=-2,
    ON_SEGMENT=0,
};

int ccw(Point p0, Point p1, Point p2) {
    Vector a=p1-p0;
    Vector b=p2-p0;
    if(cross(a,b)>EPS) return CCW::COUNTER_CLOCKWISE;
    if(cross(a,b)<-EPS) return CCW::CLOCKWISE;
    if(dot(a,b)<-EPS) return CCW::ONLINE_BACK;
    if(norm(a)<norm(b)) return CCW::ONLINE_FRONT;

    return CCW::ON_SEGMENT;
}

double getDistance(Point a,Point b) {
    return abs(a-b);
}

double getDistanceLP(Line l, Point p) {
    return abs(cross(l.p2-l.p1,p-l.p1)/abs(l.p2-l.p1));
}

bool intersect(Point p1,Point p2,Point p3,Point p4) {
    return (ccw(p1,p2,p3)*ccw(p1,p2,p4)<=0&&
            ccw(p3,p4,p1)*ccw(p3,p4,p2)<=0);
}

bool intersect(Segment s1,Segment s2) {
    return intersect(s1.p1,s1.p2,s2.p1,s2.p2);
}
bool intersect(Circle c,Line l) {
    double d=getDistanceLP(l,c.c);
    return !(d>c.r);
}

Point getCrossPoint(Segment s1,Segment s2) {
    Vector base=s2.p2-s2.p1;
    double d1=abs(cross(base,s1.p1-s2.p1));
    double d2=abs(cross(base,s1.p2-s2.p1));
    double t=d1/(d1+d2);
    return s1.p1+(s1.p2-s1.p1)*t;
}
pair<Point, Point> getCrossPoints(Circle c, Line l) {
    assert(intersect(c,l));
    Vector pr=project(l,c.c);
    Vector e=(l.p2-l.p1)/abs(l.p2-l.p1);
    double base=sqrt(c.r*c.r-norm(pr-c.c));

    return make_pair(pr+e*base,pr-e*base);

}

int main() {
    double cx,cy,r;
    cin>>cx>>cy>>r;
    Circle circle({Point(cx,cy),r});
    int q; cin>>q;
    while(q-->0) {
        double x1,y1,x2,y2;
        cin>>x1>>y1>>x2>>y2;
        Line l=Line({Point(x1,y1),Point(x2,y2)});

        auto ans=getCrossPoints(circle,l);
        vector<pair<double,double>> vec;
        vec.push_back(make_pair(ans.first.X,ans.first.Y));
        vec.push_back(make_pair(ans.second.X,ans.second.Y));
        sort(vec.begin(),vec.end());
        printf("%.10f %.10f ",vec[0].first,vec[0].second);
        printf("%.10f %.10f\n",vec[1].first,vec[1].second);
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:123:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
  123 |         sort(vec.begin(),vec.end());
      |         ^~~~
      |         sqrt
Language: C++

#include <vector>
#include <algorithm>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <climits>

using namespace std;

#define EPS (1e-10)
#define equals(a, b) (fabs((a) - (b)) < EPS)

//???
class Point {
public:
    double x, y;
    
    Point (double x = 0, double y = 0):x(x), y(y){}
    Point operator + (Point p){return Point(x + p.x, y + p.y);}
    Point operator - (Point p){return Point(x - p.x, y - p.y);}
    Point operator * (double a){return Point(a * x, a * y);}
    Point operator / (double a){return Point(x / a, y / a);}
    
    double norm(){return x*x + y*y;};
    double absolute(){return sqrt(norm());};
    
    bool operator < (const Point &p) const{
        return x != p.x ? x < p.x : y < p.y;
    }
    
    bool operator == (const Point &p) const{
        return equals(x, p.x) && equals(y, p.y);
    }
    
};
typedef Point Vector;                               //????????????
typedef struct Segment{Point p1, p2;}Segment;       //??????
typedef Segment Line;                               //??´???
typedef struct Circle{Point c; double r;}Circle;    //???


int main(){
    
    int cx, cy;
    double r;
    int q;
    int x1, y1, x2, y2;
    
    cin >> cx >> cy >> r >> q;
    
    Circle c = {Point(cx, cy), r};
    
    for (int i = 0; i < q; i++) {
        cin >> x1 >> y1 >> x2 >> y2;
        
        Line l = {Point(x1, y1), Point(x2, y2)};
        
        pair<Point, Point> ans = getCrossPoints(c, l);
        bool swap_flag = (ans.first.x == ans.second.x) ? ans.first.y > ans.second.y : (ans.first.x > ans.second.x);
        if(swap_flag) swap(ans.first, ans.second);
        
        printf("%.8lf %.8lf %.8lf %.8lf\n", ans.first.x, ans.first.y, ans.second.x, ans.second.y);
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:58:34: error: 'getCrossPoints' was not declared in this scope
   58 |         pair<Point, Point> ans = getCrossPoints(c, l);
      |                                  ^~~~~~~~~~~~~~