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

#include <stdio.h>
#include <math.h>

int main()
{
  int setcount;
  float x1, y1, x2, y2, x3, y3;
  float nx1, ny1, nx2, ny2;
  float nr1, nr2;
  float xp, yp, r;
  int tx, ty, tr, rem;
  int i;

  scanf("%d", &setcount);
  for(i=0; i<setcount; i++){
    scanf("%f %f %f %f %f %f", &x1, &y1, &x2, &y2, &x3, &y3);
    nx1=x2-x1; ny1=y2-y1;
    nx2=x3-x1; ny2=y3-y1;
    nr1=nx1^2+ny1^2; nr2=nx2^2+ny2^2;
    nr1*=0.5f; nr2*=0.5f;

    if(nx1==0){
      nr1/=ny1; ny1=1.0f;
      nr2-=nr1*ny2; ny2=0.0f;
      nr2/=nx2; nx2=1.0f;
    }
    else {
      //normalize
      ny1/=nx1; nr1/=nx1; nx1=1.0f;
      //subtraction
      ny2-=ny1*nx2; nr2-=nr1*nx2; nx2=0.0f;
      //normalize
      nr2/=ny2; ny2=1.0f;
      //subtraction
      nr1-=nr2*ny1; ny1=0.0f;
    }


    printf("%.3f %.3f %.3f\n", xp, yp, r);
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:12: error: invalid operands of types 'float' and 'float' to binary 'operator^'
   19 |     nr1=nx1^2+ny1^2; nr2=nx2^2+ny2^2;
      |         ~~~^~~~~~
      |         |    |
      |         |    float
      |         float
a.cc:19:29: error: invalid operands of types 'float' and 'float' to binary 'operator^'
   19 |     nr1=nx1^2+ny1^2; nr2=nx2^2+ny2^2;
      |                          ~~~^~~~~~
      |                          |    |
      |                          |    float
      |                          float
Language: C++

#include <stdio.h>
#include <math.h>

int main()
{
  int setcount;
  float x1, y1, x2, y2, x3, y3;
  float nx1, ny1, nx2, ny2;
  float nr1, nr2;
  float xp, yp, r;
  int tx, ty, tr, rem;
  int i;

  scanf("%d", &setcount);
  for(i=0; i<setcount; i++){

    xp=nr1+x1; yp=nr2+y1;
    r=(float)sqrt((double)(nr1^2+nr2^2));
    tx=xp*10000; ty=yp*10000; tr=r*10000;
    if((rem=tx%10)<5) tx-=rem;
    else tx+=10-rem;
    if((rem=ty%10)<5) ty-=rem;
    else ty+=10-rem;
    if((rem=tr%10)<5) tr-=rem;
    else tr+=10-rem;
    xp=(float)tx*0.0001f; yp=(float)ty*0.0001f; r=(float)tr*0.0001f;

    printf("%.3f %.3f %.3f\n", xp, yp, r);
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:31: error: invalid operands of types 'float' and 'float' to binary 'operator^'
   18 |     r=(float)sqrt((double)(nr1^2+nr2^2));
      |                            ~~~^~~~~~
      |                            |    |
      |                            |    float
      |                            float
Language: C++

#include <iostream>
using namespace std;

int main()
{
	int n;cin>>n;
	for ( int i=0; i<n; i++ )
	{
		double x1,y1,x2,y2,x3,y3;
		cin>>x1>>y1>>x2>>y2>>x3>>y3;
		
		double a1=2*(x2-x1);
		double b1=2*(y2-y1);
		double c1=x1*x1-x2*x2+y1*y1-y2*y2;
		double a2=2*(x3-x1);
		double b2=2*(y3-y1);
		double c2=x1*x1-x3*x3+y1*y1-y3*y3;
		double x=(b1*c2-b2*c1)/(a1*b2-a2*b1);
		double y=(c1*a2-c2*a1)/(a1*b2-a2*b1);
		//	http://www.h6.dion.ne.jp/~jpe02_tn/ki-5.html

		double r = sqrt((x1-x)*(x1-x)+(y1-y)*(y1-y));

		printf( "%.3f %.3f %.3f\n", x, y, r );
	}
	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:28: error: 'sqrt' was not declared in this scope
   22 |                 double r = sqrt((x1-x)*(x1-x)+(y1-y)*(y1-y));
      |                            ^~~~
Language: C++

#include <stdio.h>
#include <math.h>

#define SQ(x) ((x) * (x))

int main(void)
{
    int n;
    double x1, x2, x3, y1, y2, y3;
    double a, b, c, d, e, f;
    double l, m, n;
    
    cin >> n;
    for (int i = 0; i < n; i++){
        scanf("%lf%lf%lf%lf%lf%lf", &x1, &y1, &x2, &y2, &x3, &y3);
        
        a = (x1 - x2);
        b = (y1 - y2);
        c = -1 * (SQ(x1) - SQ(x2) + SQ(y1) - SQ(y2));
        d = (x1 - x3);
        e = (y1 - y3);
        f = -1 * (SQ(x1) - SQ(x3) + SQ(y1) - SQ(y3));
        
        l = (c * e - b * f) / (e * a - b * d);
        m = (d * c - a * f) / (d * b - e * a);
        
        n = -1 * (SQ(x1) + SQ(y1) + l * x1 + m * y1);
        
        printf("%.3f %.3f %.3f\n", l / -2.0, m / -2.0, sqrt(SQ(l) + SQ(m) - 4 * n) / 2.0);
    }
    
    return (0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: conflicting declaration 'double n'
   11 |     double l, m, n;
      |                  ^
a.cc:8:9: note: previous declaration as 'int n'
    8 |     int n;
      |         ^
a.cc:13:5: error: 'cin' was not declared in this scope; did you mean 'sin'?
   13 |     cin >> n;
      |     ^~~
      |     sin
Language: C++

#include <iostream>
using namespace std;

//0010
int main(){
	int n;
	while(cin >> n){
		double x1,y1,x2,y2,x3,y3,x,y,r;

		while(n--){
			cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;

			if(x1!=x2){
				x=(x1+x2)/2;
			}else if(x2!=x3){
				x=(x2+x3)/2;
			}else if(x3!=x1){
				x=(x3+x1)/2;
			}
			if(y1!=y2){
				y=(y1+y2)/2;
			}else if(y2!=y3){
				y=(y2+y3)/2;
			}else if(y3!=y1){
				y=(y3+y1)/2;
			}

			r=sqrt(pow(x-x1,2)+pow(y-y1,2));
			cout.setf(ios::fixed);
			cout.precision(3);
			cout << x << " " << y << " " << r << endl;
		}
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:32: error: 'pow' was not declared in this scope
   28 |                         r=sqrt(pow(x-x1,2)+pow(y-y1,2));
      |                                ^~~
a.cc:28:27: error: 'sqrt' was not declared in this scope
   28 |                         r=sqrt(pow(x-x1,2)+pow(y-y1,2));
      |                           ^~~~
a.cc:33:10: error: expected '}' at end of input
   33 |         }
      |          ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include<iostream>
#include<cmath>
#include<cstdip>
#define S second
#define F first
using namespace std;
typedef pair<double,double> P;

double Length(P p,P q){
  return sqrt(pow(p.first - q.first,2)+pow(p.second-q.second,2));
}

int main(){
  P p[3];
  double a,b,c,A,B,C,R,x,y;
  int n;
  cin >> n;
  while(n-- > 0){ 
    cin >> p[0].first >> p[0].second >> p[1].first >>p[1].second >> p[2].first >> p[2].second;
    a = Length(p[0],p[1]);
    b = Length(p[1],p[2]);
    c = Length(p[2],p[0]);
    A = acos((b*b+c*c-a*a)/(2*b*c));
    B = acos((a*a+c*c-b*b)/(2*a*c));
    C = acos((a*a+b*b-c*c)/(2*a*b));
    R = 0.5 * (a/sin(A));
    //x = 0.5*((((pow(p[0].F,2)+pow(p[0].S,2))*(p[1].S-p[2].S)+((pow(p[1].F,2)+pow(p[1].F,2))*(p[2].S-p[0].S))+((pow(p[2].F,2)+pow(p[2].S,2))*(p[0].S-p[1].S))) )   / (p[0].F*(p[1].S-p[2].S)+p[1].F*(p[2].S-p[0].S)+p[2].F*(p[0].S-p[1].S)));
    x = 0.5*( (pow(p[0].F,2)+pow(p[0].S,2))*(p[1].S-p[2].S) + (pow(p[1].F,2)+pow(p[1].S,2))*(p[2].S-p[0].S) + (pow(p[2].F,2)+pow(p[2].S,2))*(p[0].S-p[1].S)                           )/(       
																							 p[0].F*(p[1].S-p[2].S) + p[1].F*(p[2].S-p[0].S) + p[2].F*(p[0].S-p[1].S)            );

    y = 0.5*((pow(p[0].F,2)+pow(p[0].S,2))*(p[1].F-p[2].F)+(pow(p[1].F,2)+pow(p[1].S,2))*(p[2].F-p[0].F)+(pow(p[2].F,2)+pow(p[2].S,2))*(p[0].F-p[1].F))/(p[0].S*(p[1].F-p[2].F)+p[1].S*(p[2].F-p[0].F)+p[2].S*(p[0].F-p[1].F));

    printf("%.3f %.3f %.3f\n",x,y,R);
  }
  return 0;
}

Compiler output:
a.cc:3:9: fatal error: cstdip: No such file or directory
    3 | #include<cstdip>
      |         ^~~~~~~~
compilation terminated.
Language: C++

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

using namespace std;

    // 半径取得の処理
double getR(double x1, double y1, double x2, double y2, double x3, double y3) {
    
    double marginX1, marginX2, marginX3;
    double marginY1, marginY2, marginY3;
    double a, b, c;
    double r, s;
    
        // それぞれのxとyの長さを求める
    marginX1 = abs(x2 - x1);
    marginY1 = abs(y2 - y1);
    marginX2 = abs(x1 - x3);
    marginY2 = abs(y1 - y3);
    marginX3 = abs(x3 - x2);
    marginY3 = abs(y3 - y2);
    
        // それぞれの辺の長さを求める
    a = sqrt(pow(marginX1,2) + pow(marginY1,2));
    b = sqrt(pow(marginX2,2) + pow(marginY2,2));
    c = sqrt(pow(marginX3,2) + pow(marginY3,2));
    
        // 半径を求める
    s = (a + b + c) / 2;
    r = (a * b * c) / (4 * sqrt(s * (s - a) * (s - b) * (s - c)));
    
    /*
    r *= 10000;
    r = (int)r;
    r /= 10;
    r = round(r);
    r /= 1000;
    */
    
    return r;
}

    // 中心座標を求める処理
void getCentralCoodinate(double x1, double y1, double x2, double y2, double x3, double y3, double *xp, double *yp) {
    
    double marginX1, marginX2;
    double marginY1, marginY2;
    double marginXp1, marginXp2;
    double marginYp1, marginYp2;
    double n, m;
    
        // 初期化
    *xp = 0;
    *yp = 0;
    
        // それぞれのxとyの長さを求める
    marginX1 = abs(x2 - x1);
    marginY1 = abs(y2 - y1);
    marginX2 = abs(x1 - x3);
    marginY2 = abs(y1 - y3);
    
        // 中心座標を求めるのに必要な式
    marginXp1 = 2 * marginX1;
    marginYp1 = 2 * marginY1;
    marginXp2 = 2 * marginX2;
    marginYp2 = 2 * marginY2;
    
    n = pow(x1,2) - pow(x2,2) + pow(y1,2) - pow(y2,2);
    m = pow(x1,2) - pow(x3,2) + pow(y1,2) - pow(y3,2);
    
    *xp = (marginYp1 * m - marginYp2 * n) / (marginXp1 * marginYp2 - marginXp2 * marginYp1);
    *yp = (marginXp2 * n - marginXp1 * m) / (marginXp1 * marginYp2 - marginXp2 * marginYp1);
    
    /*
    *xp *= 10000;
    *xp = (int)*xp;
    *xp /= 10;
    *xp = round(*xp);
    *xp /= 1000;
    
    *yp *= 10000;
    *yp = (int)*yp;
    *yp /= 10;
    *yp = round(*yp);
    *yp /= 1000;
    */
}

    // main処理
int main(void) {
    double x1, x2, x3;
    double y1, y2, y3;
    double xp, yp;
    double r;
    int n;
    
    cin >> n;
    
    while(n--) {
        cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
        
            // 半径と中心座標を取得する処理
        r = getR(x1, y1, x2, y2, x3, y3);
        getCentralCoodinate(x1, y1, x2, y2, x3, y3, &xp, &yp);
        
            // 出力
        cout << setprecision(3);
        cout << setiosflags(ios::fixed);
        cout << xp << " " << yp << " " << r << endl;
    }
    
  

Compiler output:
a.cc: In function 'int main()':
a.cc:110:6: error: expected '}' at end of input
  110 |     }
      |      ^
a.cc:90:16: note: to match this '{'
   90 | int main(void) {
      |                ^
Language: C++

#include <iostream>

using namespace std;

double dist(double x1, double y1, double x2, double y2){
	return sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));
}

int main(){

	double x[3], y[3];
	int n;

	cin >> n;
	while(n-- > 0){
		for(int i = 0; i < 3; i++){
			cin >> x[i] >> y[i];
		}

		double a = x[1] - x[0];
		double b = y[1] - y[0];
		double c = x[2] - x[1];
		double d = y[2] - y[1];
		double e = a*a + b*b;
		double f = c*c + d*d;

		double p = (e*c - f*a) / (2 * (b*c - a*d));
		double q = (e*d - f*b) / (2 * (a*d - b*c));

		double r = dist(x[0], y[0], p, q);

		cout.setf(ios::fixed);
		cout.precision(4);
		cout << p << ' ' << q << ' ' << r << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'double dist(double, double, double, double)':
a.cc:6:16: error: 'sqrt' was not declared in this scope
    6 |         return sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));
      |                ^~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <algorithm>

struct Vector2D {
	double x, y;

	Vector2D() : x(0.0), y(0.0) {}
	Vector2D(double vx, double vy) : x(vx), y(vy) {}
	Vector2D& operator+=(const Vector2D& rhs)
	{
		x += rhs.x;
		y += rhs.y;
		return *this;
	}
	Vector2D& operator-=(const Vector2D& rhs)
	{
		x -= rhs.x;
		y -= rhs.y;
		return *this;
	}
	Vector2D& operator*=(double rhs)
	{
		x *= rhs;
		y *= rhs;
		return *this;
	}
};

Vector2D operator+(const Vector2D& lhs, const Vector2D& rhs)
{
	Vector2D result(lhs);
	return result += rhs;
}

Vector2D operator-(const Vector2D& lhs, const Vector2D& rhs)
{
	Vector2D result(lhs);
	return result -= rhs;
}

Vector2D operator*(double lhs, const Vector2D& rhs)
{
	Vector2D result(rhs);
	return result *= lhs;
}

void solve(Vector2D p1, Vector2D p2, Vector2D p3, Vector2D& center, double& radius)
{
	// p3-base p1, p3-base p2
	Vector2D r1(p1 - p3), r2(p2 - p3);

	double det = r2.x * r1.y - (-r1.x) * r2.y;
	double a = (r2.x * (r2.x - r1.x) + r2.y * (r1.y - r2.y)) * 0.5 / det;

	center = p3 + (0.5 * r1 + a * Vector2D(r1.y, -r1.x));

	Vector2D r = p1 - center;
	radius = sqrt(r.x * r.x + r.y * r.y);
}

int main()
{
	int count = 0;
	std::cin >> count;
	for (int i = 0; i < count; ++i) {
		Vector2D p1,p2,p3;
		std::cin >> p1.x >> p1.y >> p2.x >> p2.y >> p3.x >> p3.y;
		if (!std::cin.good()) {
			break;
		}
		Vector2D center;
		double radius = 0.0;
		solve(p1, p2, p3, center, radius);
		std::printf("%.3f %.3f %.3f\n", center.x, center.y, radius);
	}

	return 0;
}

Compiler output:
a.cc: In function 'void solve(Vector2D, Vector2D, Vector2D, Vector2D&, double&)':
a.cc:59:18: error: 'sqrt' was not declared in this scope
   59 |         radius = sqrt(r.x * r.x + r.y * r.y);
      |                  ^~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <algorithm>

struct Vector2D {
	double x, y;

	Vector2D() : x(0.0), y(0.0) {}
	Vector2D(double vx, double vy) : x(vx), y(vy) {}
	Vector2D& operator+=(const Vector2D& rhs)
	{
		x += rhs.x;
		y += rhs.y;
		return *this;
	}
	Vector2D& operator-=(const Vector2D& rhs)
	{
		x -= rhs.x;
		y -= rhs.y;
		return *this;
	}
	Vector2D& operator*=(double rhs)
	{
		x *= rhs;
		y *= rhs;
		return *this;
	}
};

Vector2D operator+(const Vector2D& lhs, const Vector2D& rhs)
{
	Vector2D result(lhs);
	return result += rhs;
}

Vector2D operator-(const Vector2D& lhs, const Vector2D& rhs)
{
	Vector2D result(lhs);
	return result -= rhs;
}

Vector2D operator*(double lhs, const Vector2D& rhs)
{
	Vector2D result(rhs);
	return result *= lhs;
}

void solve(Vector2D p1, Vector2D p2, Vector2D p3, Vector2D& center, double& radius)
{
	// p3-base p1, p3-base p2
	Vector2D r1(p1 - p3), r2(p2 - p3);

	double det = r2.x * r1.y - (-r1.x) * r2.y;
	double a = (r2.x * (r2.x - r1.x) + r2.y * (r1.y - r2.y)) * 0.5 / det;

	center = p3 + (0.5 * r1 + a * Vector2D(r1.y, -r1.x));

	Vector2D r = p1 - center;
	radius = std::sqrt(r.x * r.x + r.y * r.y);
}

int main()
{
	int count = 0;
	std::cin >> count;
	for (int i = 0; i < count; ++i) {
		Vector2D p1,p2,p3;
		std::cin >> p1.x >> p1.y >> p2.x >> p2.y >> p3.x >> p3.y;
		if (!std::cin.good()) {
			break;
		}
		Vector2D center;
		double radius = 0.0;
		solve(p1, p2, p3, center, radius);
		std::printf("%.3f %.3f %.3f\n", center.x, center.y, radius);
	}

	return 0;
}

Compiler output:
a.cc: In function 'void solve(Vector2D, Vector2D, Vector2D, Vector2D&, double&)':
a.cc:59:23: error: 'sqrt' is not a member of 'std'; did you mean 'sort'?
   59 |         radius = std::sqrt(r.x * r.x + r.y * r.y);
      |                       ^~~~
      |                       sort
Language: C++

#include <iostream>
#include <vector>
#include <math.h>

using namespace std;

int main(){
  double x1,y1,x2,y2,x3,y3;
  vector<double> x1l,y1l,x2l,y2l,x3l,y3l;
  int n;

  cin >> n;

  for(int i=0; i<n; i++){
    cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
    x1l.push_back(x1);
    y1l.push_back(y1);
    x2l.push_back(x2);
    y2l.push_back(y2);
    x3l.push_back(x3);
    y3l.push_back(y3);
  }

  double ex,ey,fx,fy;
  double a,b,c,d,e,f,r;
  double cx,cy;

  for(int i=0; i<n; i++){
    x1=x1l[i];
    y1=y1l[i];
    x2=x2l[i];
    y2=y2l[i];
    x3=x3l[i];
    y3=y3l[i];

    a = x1*x1+y1+y1;
    b = x2*x2+y2+y2;
    c = x3*x3+y3+y3; 
    d = 0.5/(x1*y2-x2*y1+x2*y3-x3*y2+x3*y1-x1*y3);
    e = d*(a*y2-b*y1+b*y3-c*y2+c*y1-a*y3);
    f = d*(x1*b-x2*a+x2*c-x3*b+x3*a-x1*c);
    r = sqrt((e-x1)*(e-x1)+(f-y1)*(f-y1));
    printf("%0.3f %0.3f %0.3f\n",e,f,r);
  }

  r

Compiler output:
a.cc: In function 'int main()':
a.cc:46:4: error: expected ';' at end of input
   46 |   r
      |    ^
      |    ;
a.cc:46:4: error: expected '}' at end of input
a.cc:7:11: note: to match this '{'
    7 | int main(){
      |           ^
Language: C++

#include<iostream>
#include<cstdio>
#include<math.h>
using namespace std;

int main()
{
	int i,n;
	double x1,x2,x3,y1,y2,y3;
	double m1,m2,xm1,xm2,ym1,ym2,xo,yo,r;
	//m1,m2…辺の法線 xm1,ym1…辺の中点の座標

	cin>>n;
	for(i=0;i<n;i++){
		flg=0;
		cin>>x1>>y1>>x2>>y2>>x3>>y3;

		xm1=(x1+x2)/2;
		xm2=(x2+x3)/2;
		ym1=(y1+y2)/2;
		ym2=(y2+y3)/2;
		
		if(y1-y2!=0) 		m1=(-1)*(x1-x2)/(y1-y2);
		else if(y1-y2==0)	flg=1;
		
		if(y2-y3!=0)		m2=(-1)*(x2-x3)/(y2-y3);
		else if(y2-y3==0)	flg=2;
		
		if(flg==0) 	xo=(m1*xm1-m2*xm2+ym2-ym1)/(m1-m2);
		else if(flg==1)xo=xm1;
		else if(flg==2)xo=xm2;

		if(flg==1)yo=m2*(xo-xm2)+ym2;
		else		yo=m1*(xo-xm1)+ym1;
		r=sqrt((x1-xo)*(x1-xo)+(y1-yo)*(y1-yo));
		printf("%.3lf %.3lf %.3lf \n",xo,yo,r);
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: 'flg' was not declared in this scope
   15 |                 flg=0;
      |                 ^~~
Language: C++

#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;

int main(){
	int n;
	double x1, y1, x2, y2, x3, y3, m1, m2, m3, b1, b2, b3, px, py, r;
	double d[2], e[2], f[2];
	cin >> n;
	for(int i = 0; i < n; i++){
		cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
		d[0] = (x2 + x3) / 2;
		d[1] = (y2 + y3) / 2;
		e[0] = (x3 + x1) / 2;
		e[1] = (y3 + y1) / 2; int count = 0;
        for(int i = 0; i <= n; i++){
            if(num[i]){
                count++;
            }
        }
        cout << count << endl;
    }

		f[0] = (x1 + x2) / 2;
		f[1] = (y1 + y2) / 2;
		m1 = (y3 - y2) / (x3 - x2);
		m2 = (y1 - y3) / (x1 - x3);
		m3 = (y2 - y1) / (x2 - x1);
		b1 = d[1] + d[0] / m1;
		b2 = e[1] + e[0] / m2;
		b3 = f[1] + f[0] / m3;
		px = -(b1 - b2) / ((1 / m2) - (1 / m1));
		py = -(1 / m1) * px + b1;
		r = (double)sqrt((x1 - px) * (x1 - px) + (y1 - py) * (y1 - py));
		px = floor(1000 * (px + 0.0005)) / 1000;
		py = floor(1000 * (py + 0.0005)) / 1000;
		r = floor(1000 * (r + 0.0005)) / 1000;
		cout << fixed << setprecision(3) << px << " " <<  py << " " << r << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:16: error: 'num' was not declared in this scope; did you mean 'enum'?
   18 |             if(num[i]){
      |                ^~~
      |                enum
a.cc: At global scope:
a.cc:41:9: error: expected unqualified-id before 'return'
   41 |         return 0;
      |         ^~~~~~
a.cc:42:1: error: expected declaration before '}' token
   42 | }
      | ^
Language: C++

#include <iostream>
#include <iomanip>
#include <vector>
#include <cmath>
using namespace std;
typedef vector <double> vd;
typedef vector <vd> vvd;

vvd inverse(vvd &x){
	vvd tmp(2, vd(2));
	if (x.size()!=2) return tmp;
	double a, b, c, d, e;
	a = x[0][0];
	b = x[0][1];
    c = x[1][0];
	d = x[1][1];
    e = 1.0 / (a*d-b*c);
	tmp[0][0] = d * e;
	tmp[0][1] = -b * e;
	tmp[1][0] = -c * e;
	tmp[1][1] = a * e;
	return tmp;
}

vvd Mmult(vvd &A, vvd &B){
    int n1=A.size();
    int n2=A[0].size();
	int n3=B[0].size();
	vvd C(n1, vd(n3));
	for (int i=0; i<n1; i++)
		for (int j=0; j<n3; j++)
			C[i][j] = 0;

    for (int i=0; i<n1; i++)
		for (int j=0; j<n2; j++)
			for (int k=0; k<n3; k++)
				C[i][k] += A[i][j] * B[j][k];
    return C;
}

int main(void){
    int n;
	double x1, y1, x2, y2, x3, y3, dx1, dy1, dx2, dy2;
	vvd A(2, vd(2)), B(2, vd(1));
	cin>>n;
	for (int i=1; i<n+1; i++){
		cin>>x1>>y1>>x2>>y2>>x3>>y3;
		dx1 = x2 - x1;
		dy1 = y2 - y1;
		dx2 = x3 - x1;
		dy2 = y3 - y1;
		A[0][0] = -dx1;
		A[0][1] = dy1;
		A[1][0] = -dx2;
		A[1][1] = dy2;
		B[0][0] = -dx1*(x1+x2)/2 + dy1*(y1+y2)/2;
		B[1][0] = -dx2*(x1+x3)/2 + dy2*(y1+y3)/2;
		B = Mmult(inverse(A), B);

		double r = pow(pow(B[0][0]-x1,2)+pow(B[1][0]-y1,2), 0.5);
	    cout<<fixed<<setprecision(3);
		cout<<B[0][0]<<" "<<B[1][0]<<" "<<r<<endl;
	}
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:58:34: error: cannot bind non-const lvalue reference of type 'vvd&' {aka 'std::vector<std::vector<double> >&'} to an rvalue of type 'vvd' {aka 'std::vector<std::vector<double> >'}
   58 |                 B = Mmult(inverse(A), B);
      |                           ~~~~~~~^~~
a.cc:25:16: note:   initializing argument 1 of 'vvd Mmult(vvd&, vvd&)'
   25 | vvd Mmult(vvd &A, vvd &B){
      |           ~~~~~^
Language: C++

#include <iostream>
#include <iomanip>
#include <vector>
#include <cmath>
using namespace std;
typedef vector <double> vd;
typedef vector < vd > vvd;

vvd inverse(vvd &x){
	vvd tmp(2, vd(2));
	if (x.size()!=2) return tmp;
	double a, b, c, d, e;
	a = x[0][0];
	b = x[0][1];
    c = x[1][0];
	d = x[1][1];
    e = 1.0 / (a*d-b*c);
	tmp[0][0] = d * e;
	tmp[0][1] = -b * e;
	tmp[1][0] = -c * e;
	tmp[1][1] = a * e;
	return tmp;
}

vvd Mmult(vvd &A, vvd &B){
    int n1=A.size();
    int n2=A[0].size();
	int n3=B[0].size();
	vvd C(n1, vd(n3));
	for (int i=0; i<n1; i++)
		for (int j=0; j<n3; j++)
			C[i][j] = 0;

    for (int i=0; i<n1; i++)
		for (int j=0; j<n2; j++)
			for (int k=0; k<n3; k++)
				C[i][k] += A[i][j] * B[j][k];
    return C;
}

int main(void){
    int n;
	double x1, y1, x2, y2, x3, y3, dx1, dy1, dx2, dy2;
	vvd A(2, vd(2)), B(2, vd(1));
	cin>>n;
	for (int i=1; i<n+1; i++){
		cin>>x1>>y1>>x2>>y2>>x3>>y3;
		dx1 = x2 - x1;
		dy1 = y2 - y1;
		dx2 = x3 - x1;
		dy2 = y3 - y1;
		A[0][0] = -dx1;
		A[0][1] = dy1;
		A[1][0] = -dx2;
		A[1][1] = dy2;
		B[0][0] = -dx1*(x1+x2)/2 + dy1*(y1+y2)/2;
		B[1][0] = -dx2*(x1+x3)/2 + dy2*(y1+y3)/2;
		B = Mmult(inverse(A), B);

		double r = pow(pow(B[0][0]-x1,2)+pow(B[1][0]-y1,2), 0.5);
	    cout<<fixed<<setprecision(3);
		cout<<B[0][0]<<" "<<B[1][0]<<" "<<r<<endl;
	}
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:58:34: error: cannot bind non-const lvalue reference of type 'vvd&' {aka 'std::vector<std::vector<double> >&'} to an rvalue of type 'vvd' {aka 'std::vector<std::vector<double> >'}
   58 |                 B = Mmult(inverse(A), B);
      |                           ~~~~~~~^~~
a.cc:25:16: note:   initializing argument 1 of 'vvd Mmult(vvd&, vvd&)'
   25 | vvd Mmult(vvd &A, vvd &B){
      |           ~~~~~^
Language: C++


    for(int i=0; i<3; i++) {
      for(int j=0; j<3; j++) {
	cout << A[i][j] << " ";
      }
      cout << endl;
    }
    

Compiler output:
a.cc:2:5: error: expected unqualified-id before 'for'
    2 |     for(int i=0; i<3; i++) {
      |     ^~~
a.cc:2:18: error: 'i' does not name a type
    2 |     for(int i=0; i<3; i++) {
      |                  ^
a.cc:2:23: error: 'i' does not name a type
    2 |     for(int i=0; i<3; i++) {
      |                       ^
Language: C++

#define INF 100000000
using namespace std;
#define pw(a) (a)*(a)

int main(){
  double x1,x2,x3,y1,y2,y3;
  int n;
  cin >> n;
  while(n--){
    cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
    double a,b,l,m,n;
    a = -1*(pw(x1) - pw(x2) + pw(y1) - pw(y2));
    b = -1*(pw(x1) - pw(x3) + pw(y1) - pw(y3));
    l = (a*(y1-y3)+b*(y1-y2))/((y1-y3)*(x1-x2)-(x1-x3)*(y1-y2));
    m = (b-(x1-x3)*l)/(y1-y3);
    n = (x1*l + y1*m) - (pw(x1) + pw(y1));
    printf("%.3f %.3f %.3f\n",(float)-l/2,(float)-m/2,(float)sqrt((pw(l) + pw(m) - 4*n))/2);
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope
    8 |   cin >> n;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #define INF 100000000
a.cc:17:62: error: 'sqrt' was not declared in this scope
   17 |     printf("%.3f %.3f %.3f\n",(float)-l/2,(float)-m/2,(float)sqrt((pw(l) + pw(m) - 4*n))/2);
      |                                                              ^~~~
a.cc:17:5: error: 'printf' was not declared in this scope
   17 |     printf("%.3f %.3f %.3f\n",(float)-l/2,(float)-m/2,(float)sqrt((pw(l) + pw(m) - 4*n))/2);
      |     ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #define INF 100000000
Language: C++

#include<iostream>
#include<cmath>
#include<cstdio>
using namespace std;

int main(){

  long double x1,x2,x3,y1,y2,y3;
  long double p,q,r;
  int tmp;
  int n;

  cin >> n;

  while(n--){
    cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;

    p = ((y1-y3)*(y1*y1 -y2*y2 +x1*x1 -x2*x2) -(y1-y2)*(y1*y1 -y3*y3 +x1*x1 -x3*x3)) / (2*(y1-y3)*(x1-x2)-2*(y1-y2)*(x1-x3));

    q = ((x1-x3)*(x1*x1 -x2*x2 +y1*y1 -y2*y2) -(x1-x2)*(x1*x1 -x3*x3 +y1*y1 -y3*x3)) / (2*(x1-x3)*(y1-y2)-2*(x1-x2)*(y1-y3));

    r2 = sqrt((x1-p)*(x1-p) + (y1-q)*(y1-q));

    printf("%.3Lf %.3Lf %.3Lf\n", p, q, r);
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:5: error: 'r2' was not declared in this scope; did you mean 'r'?
   22 |     r2 = sqrt((x1-p)*(x1-p) + (y1-q)*(y1-q));
      |     ^~
      |     r
Language: C++

#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;

inline sqr(double x){return x*x;}
inline double Roundoff(double x){
	if( x<0 ){
		x*=-1;
		x=(x-(x-int(x*1000)/1000))+(((x*1000)-int(x*1000))*10)>=4?0.001:0;
		x*=-1;
	}else{
		x=(x-(x-int(x*1000)/1000))+(((x*1000)-int(x*1000))*10)>=4?0.001:0;
	}
	return x;
}

void SolveSimultEq(double &x,double &y,double a,double b,double c,double d,double e,double f);
int main(){
	int datanum;
	double *x1,*y1,*x2,*y2,*x3,*y3;
	cin>>datanum;
	x1=new double[datanum];
	y1=new double[datanum];
	x2=new double[datanum];
	y2=new double[datanum];
	x3=new double[datanum];
	y3=new double[datanum];
	
	for( int i=0;i<datanum;i++ ){
		cin>>x1[i]>>y1[i]>>x2[i]>>y2[i]>>x3[i]>>y3[i];
	}
	for( int i=0;i<datanum;i++ ){
		double px,py,r;
		
		SolveSimultEq(px,py,2*(x1[i]-x2[i]),2*(y1[i]-y2[i]),sqr(x1[i])-sqr(x2[i])+sqr(y1[i])-sqr(y2[i]),
  			  	    2*(x2[i]-x3[i]),2*(y2[i]-y3[i]),sqr(x2[i])-sqr(x3[i])+sqr(y2[i])-sqr(y3[i]));
		r=sqrt(sqr(x1[i]-px)+sqr(y1[i]-py));
		cout<<fixed<<setprecision(3)<<px<<" "<<setprecision(3)<<py<<" "<<setprecision(3)<<r<<endl;

	}

	delete x1;
	delete y1;
	delete x2;
	delete y2;
	delete x3;
	delete y3;
	return 0;
}

void SolveSimultEq(double &x,double &y,double a,double b,double c,double d,double e,double f){
	double delta=a*e-b*d;
	
	x=(c*e-b*f)/delta;
	y=(a*f-c*d)/delta;
}

Compiler output:
a.cc:6:8: error: ISO C++ forbids declaration of 'sqr' with no type [-fpermissive]
    6 | inline sqr(double x){return x*x;}
      |        ^~~
Language: C++

#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;

inline double square(double x){return x*x;}
inline double Roundoff(double x){
	if( x<0 ){
		x*=-1;
		x=(x-(x-int(x*1000)/1000))+(((x*1000)-int(x*1000))*10)>=4?0.001:0;
		x*=-1;
	}else{
		x=(x-(x-int(x*1000)/1000))+(((x*1000)-int(x*1000))*10)>=4?0.001:0;
	}
	return x;
}

void SolveSimultEq(double &x,double &y,double a,double b,double c,double d,double e,double f);
int main(){
	int datanum;
	double *x1,*y1,*x2,*y2,*x3,*y3;
	cin>>datanum;
	x1=new double[datanum];
	y1=new double[datanum];
	x2=new double[datanum];
	y2=new double[datanum];
	x3=new double[datanum];
	y3=new double[datanum];
	
	for( int i=0;i<datanum;i++ ){
		cin>>x1[i]>>y1[i]>>x2[i]>>y2[i]>>x3[i]>>y3[i];
	}
	for( int i=0;i<datanum;i++ ){
		double px,py,r;
		
		SolveSimultEq(px,py,2*(x1[i]-x2[i]),2*(y1[i]-y2[i]),square(x1[i])-square(x2[i])+square(y1[i])-square(y2[i]),
  			  	    2*(x2[i]-x3[i]),2*(y2[i]-y3[i]),square(x2[i])-square(x3[i])+square(y2[i])-square(y3[i]));
		r=squaret(square(x1[i]-px)+square(y1[i]-py));
		cout<<fixed<<setprecision(3)<<px<<" "<<setprecision(3)<<py<<" "<<setprecision(3)<<r<<endl;

	}

	delete x1;
	delete y1;
	delete x2;
	delete y2;
	delete x3;
	delete y3;
	return 0;
}

void SolveSimultEq(double &x,double &y,double a,double b,double c,double d,double e,double f){
	double delta=a*e-b*d;
	
	x=(c*e-b*f)/delta;
	y=(a*f-c*d)/delta;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:19: error: 'squaret' was not declared in this scope; did you mean 'square'?
   38 |                 r=squaret(square(x1[i]-px)+square(y1[i]-py));
      |                   ^~~~~~~
      |                   square
Language: C++

#include <stdio.h>
#include<string>
#include<string.h>
#include <math.h>
#include<iostream>
#include <algorithm>
#include <map>
#include <vector>
#include <queue>
using namespace  std;


/*
//my header
#include "define.h"
#include "geometry.h"*/

#define MyAbs(a) ((a)>0?(a):-(a))
#define MyEqualDoule(a,b) (MyAbs(a-b)<1e-6)

#define foreach(i,n) for(i=0;i<n;++i)
#define foreachd(i,n) for(int i=0;i<n;++i)
#define printfInt1(n) printf("%d\n",n)
#define scanfInt1(n) scanf("%d",&n)
#define scanfInt2(a,b) scanf("%d%d", &a, &b)
#define scanfInt3(a,b,c) scanf("%d%d%d", &a, &b, &c)
#define scanfFloat2(a,b) scanf("%f%f", &a,&b)


void init()
{
#ifdef _WIN32
	freopen("1.txt", "r", stdin);
#endif
}

void func();

int main()
{
	init();
	func();

	return 0;
}



//譁ケ遞?class CMathEquation 
{
public:
	//ax + by = c;dx + ey = d;荳疲婿遞矩怙隕∽ソ晁ッ∵怏隗」
	static void CalcuXY(double&x, double&y, double a, double b, double c, double d,double e,double f)
	{
		x = (c*e-f*b)*1.0/(a*e - b*d);
		y = (c*d-a*f)*1.0/(b*d - a*e);
		if(MyEqualDoule(x, 0))
			x = 0;
		if(MyEqualDoule(y, 0))
			y = 0;
	}

	//蟾イ遏・荳臥せ蟆ア蝨?噪蝨?ソバx?経y蜥悟濠蠕в
	static void CalcuCircleByPoint3(double& ox, double& oy, double& r, double x1, double y1, double x2, double y2,double x3, double y3)
	{
		double a,b,c,d,e,f;

		double dx12,dx13,dy12,dy13,dx12_2,dy12_2,dx13_2,dy13_2;
		dx12 = x1 - x2;
		dx12_2 = dx12 * (x1 + x2);
		dy12 = y1 - y2;
		dy12_2 = dy12 * (y1 + y2);
		dx13 = x1 - x3;
		dx13_2 = dx13 * (x1 + x3);
		dy13 = y1 - y3;
		dy13_2 = dy13 * (y1 + y3);
		
		a = dx12;
		b = dy12;
		c = (dx12_2 + dy12_2) / 2.0;
		d = dy13;
		e = dy13;
		f = (dx13_2 + dy13_2) / 2.0;
		CalcuXY(ox, oy, a, b, c, d, e, f);
		r = pow((ox - x1), 2) + pow((oy - y1), 2);
		r = sqrt(r);
	}
};


void func()
{
	int n;
	scanf("%d", &n);
	while(n--)
	{
		double x1,y1, x2,y2,x3,y3;
		scanf("%lf%lf%lf%lf%lf%lf", &x1, &y1, &x2, &y2, &x3, &y3);
		double ox, oy, r;
		CMathEquation::CalcuCircleByPoint3(ox, oy, r, x1, y1, x2, y2, x3, y3);
		printf("%.3lf %.3lf %.3lf\n", ox, oy, r);
	}
}

Compiler output:
a.cc:50:1: error: expected unqualified-id before '{' token
   50 | {
      | ^
a.cc: In function 'void func()':
a.cc:100:17: error: 'CMathEquation' has not been declared
  100 |                 CMathEquation::CalcuCircleByPoint3(ox, oy, r, x1, y1, x2, y2, x3, y3);
      |                 ^~~~~~~~~~~~~
Language: C++

#include <iomanip>
#include <iostream>
using namespace std;

/** Problem0010 : CIrcumscribed Circle of a Triangle **/
int main()
{
	int n;
	double X1, Y1, X2, Y2, X3, Y3;
	double a, b, c, d, e, f, l, m;
	cin >> n;
	for (int i=0; i<n; i++) {
		cin >> X1 >> Y1 >> X2 >> Y2 >> X3 >> Y3;
		a = X1-X2; b = Y1-Y2; c = -(X1*X1+Y1*Y1)+(X2*X2+Y2*Y2);
		d = X2-X3; e = Y2-Y3; f = -(X2*X2+Y2*Y2)+(X3*X3+Y3*Y3);
		l = (c*e - b*f)/(e*a - b*d); m = (c*d - a*f)/(b*d - a*e);
		cout << setprecision(3) << setiosflags(ios::fixed);
		cout << -l/2 << " " << -m/2 << " " << sqrt(l*l+m*m-4*n)/2 << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:55: error: 'sqrt' was not declared in this scope
   18 |                 cout << -l/2 << " " << -m/2 << " " << sqrt(l*l+m*m-4*n)/2 << endl;
      |                                                       ^~~~
Language: C++

#include "stdio.h"
#include <iostream>
using namespace std;

/** Problem0010 : CIrcumscribed Circle of a Triangle **/
int main()
{
	int N;
	double X1, Y1, X2, Y2, X3, Y3;
	double a, b, c, d, e, f, l, m, n;
	cin >> N;
	for (int i=0; i<N; i++) {
		cin >> X1 >> Y1 >> X2 >> Y2 >> X3 >> Y3;
		a = X1-X2; b = Y1-Y2; c = -(X1*X1+Y1*Y1-X2*X2-Y2*Y2);
		d = X2-X3; e = Y2-Y3; f = -(X2*X2+Y2*Y2-X3*X3-Y3*Y3);
		l = (c*e - b*f)/(e*a - b*d); m = (c*d - a*f)/(b*d - a*e);
		n = -(X1*X1+Y1*Y1+l*X1+m*Y1);
		printf("%.3f %.3f %.3f\n",l*-0.5,m*-0.5,sqrt(l*l+m*m-n*4.0)/2.0);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:57: error: 'sqrt' was not declared in this scope
   18 |                 printf("%.3f %.3f %.3f\n",l*-0.5,m*-0.5,sqrt(l*l+m*m-n*4.0)/2.0);
      |                                                         ^~~~
Language: C++

#include<iostream>
using namespace std;

int main()
{
	int n;
	double x1,y1,x2,y2,x3,y3;
	cin >> n;

	for(int i=0;i<n;i++)
	{
		cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;

		double a1 = 2*(x2 - x1);
		double b1 = 2*(y2 - y1);
		double c1 = x1*x1 - x2*x2 + y1*y1 - y2*y2;

		double a2 = 2*(x3 -x1);
		double b2 = 2*(y3 - y1);
		double c2 = x1*x1 - x3*x3 + y1*y1 - y3*y3;

		double x = (b1*c2 - b2*c1) / (a1*b2 - a2*b1);
		double y = (c1*a2 - c2*a1) / (a1*b2 - a2*b1);

		double r_2 = (x1 - x)*(x1 - x) + (y1 - y)*(y1 - y);
		double r = sqrt(r_2);

		cout << x << " " << y << " " << r << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:28: error: 'sqrt' was not declared in this scope
   26 |                 double r = sqrt(r_2);
      |                            ^~~~
Language: C++

#include <iostream>
#include <cmath>
#include <cstdio>
using namespace std;

int main()
{
    int n;
    double x1,y1,x2,y2,x3,y3,x,y,r,d,dx1,dx2,dx3;
    cin>>n;
    while(n--)
    {
        cin>>x1>>y1>>x2>>y2>>x3>>y3;
        d=2*(x1*(y2-y3)+x2*(y3-y1)+x3*(y1-y2));
        dx=x1*x1+y1*y1;
        dx2=x2*x2+y2*y2;
        dx3=x3*x3+y3*y3;
        x=(dx1*(y2-y3)+dx2*(y3-y3)+dx3*(y1-y2))/d;
        y=(dx1*(x3-x2)+dx2*(x1-x3)+dx3*(x2-x1))/d;
        r=sqrt(pow(x1-x,2)+pow(y1-y,2));
        printf("%.3lf %.3lf %.3lf\n",x,y,r);
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: 'dx' was not declared in this scope; did you mean 'dx3'?
   15 |         dx=x1*x1+y1*y1;
      |         ^~
      |         dx3
Language: C++

import java.util.Scanner;
import java.lang.Math;

class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		int n = scan.nextInt();
		for(int i = 0; i < n; i++) {
			double x1,y1,x2,y2,x3,y3;
			
			x1 = scan.nextDouble();
			y1 = scan.nextDouble();
			x2 = scan.nextDouble();
			y2 = scan.nextDouble();
			x3 = scan.nextDouble();
			y3 = scan.nextDouble();
			
			double a1, a2, b1, b2, c1, c2, px, py;

			a1 = 2 * (x2 - x1);
			b1 = 2 * (y2 - y1);
			c1 = x1*x1 - x2*x2 + y1*y1 - y2*y2;
			
			a2 = 2 * (x3 - x1);
			b2 = 2 * (y3 - y1);
			c2 = x1*x1 - x3*x3 + y1*y1 - y3*y3;
			
			double temp = a1*b2 - a2*b1;
			
			px = (b1*c2 - b2*c1) / temp;
			py = (c1*a2 - c2*a1) / temp;
			
			double r = Math.sqrt((x1-px)*(x1-px) + (y1-py)*(y1-py));
			
			System.out.printf("%.3f %.3f %.3f", px, py, r);
		}
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.lang.Math;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:15: error: expected ':' before 'static'
    5 |         public static void main(String[] args) {
      |               ^~~~~~~
      |               :
a.cc:5:33: error: 'String' has not been declared
    5 |         public static void main(String[] args) {
      |                                 ^~~~~~
a.cc:5:42: error: expected ',' or '...' before 'args'
    5 |         public static void main(String[] args) {
      |                                          ^~~~
a.cc:39:2: error: expected ';' after class definition
   39 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:6:17: error: 'Scanner' was not declared in this scope
    6 |                 Scanner scan = new Scanner(System.in);
      |                 ^~~~~~~
a.cc:8:25: error: 'scan' was not declared in this scope
    8 |                 int n = scan.nextInt();
      |                         ^~~~
a.cc:34:36: error: 'Math' was not declared in this scope
   34 |                         double r = Math.sqrt((x1-px)*(x1-px) + (y1-py)*(y1-py));
      |                                    ^~~~
a.cc:36:25: error: 'System' was not declared in this scope
   36 |                         System.out.printf("%.3f %.3f %.3f", px, py, r);
      |                         ^~~~~~
Language: Java


import java.util.Scanner;
import java.io.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int w = sc.nextInt();
		int n = sc.nextInt();
		int[] c = new int[2];
		int f=0;
		int s=0;
		int temp = 0;
		int[] amida = new int[w];
		for(int i = 0 ; i < w ; i ++)
			amida[i]=i+1;
		for(int i = 0 ; i < n ; i ++){
			c=br.readLine().split(",");
			f=Integer.parseInt(c[0]);
			s=Integer.parseInt(c[1]);
			temp=amida[f-1];
			amida[f-1]=amida[s-1];
			amida[s-1]=temp;
		}
		for(int i = 0;i>0;i++){
			System.out.println(amida[i]);
		}
	}
}

Compiler output:
Main.java:18: error: incompatible types: String[] cannot be converted to int[]
			c=br.readLine().split(",");
			                     ^
Main.java:19: error: incompatible types: int cannot be converted to String
			f=Integer.parseInt(c[0]);
			                    ^
Main.java:20: error: incompatible types: int cannot be converted to String
			s=Integer.parseInt(c[1]);
			                    ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
3 errors
Language: Java

import java.io.*;
import java.util.*;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int w = sc.nextInt();
		int n = sc.nextInt();
		int a[] = new int[w];
		int b[] = new int[w];
		int c[] = new int[w];
		int temp;
		int i = 0;
		for(i=0;i<w;i++){
			a[i] = i + 1;
			b[i] = sc.nextInt();
			c[i] = sc.nextInt();
		}
		for(i=0;i<w;i++){
			temp = a[b[i]];
			a[b[i]] = a[c[i]];
			a[c[i]] = temp;
		}
		for(i=0;i<w;i++){
			System.out.println(a[i]);
		}
}

Compiler output:
Main.java:27: error: reached end of file while parsing
}
 ^
1 error
Language: Java

import java.io.*;
import java.util.*;

public class Amidakuji{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int w = sc.nextInt();
		int n = sc.nextInt();
		int a[] = new int[w];
		int b[] = new int[w];
		int c[] = new int[w];
		int temp;
		int i = 0;
		for(i=0;i<w;i++){
			a[i] = i + 1;
			b[i] = sc.nextInt();
			c[i] = sc.nextInt();
		}
		for(i=0;i<w;i++){
			temp = a[b[i]];
			a[b[i]] = a[c[i]];
			a[c[i]] = temp;
		}
		for(i=0;i<w;i++){
			System.out.println(a[i]);
		}
	}
}

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

import java.io.*;
import java.util.*;

public class Amidakuji{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in).useDelimiter("\\D");;
		int w = sc.nextInt();
		int n = sc.nextInt();
		int a[] = new int[w];
		int b[] = new int[n];
		int c[] = new int[n];
		int temp = 0;
		int i = 0;
		for(i=0;i<n;i++){
			b[i] = sc.nextInt();
			c[i] = sc.nextInt();
		}
		for(i=0;i<w;i++){
			a[i] = i + 1;
		}
		for(i=0;i<n;i++){
			temp = a[b[i]];
			a[b[i]] = a[c[i]];
			a[c[i]] = temp;
		}
		for(i=0;i<w;i++){
			System.out.println(a[i]);
		}
	}
}

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


import java.util.Scanner;

public class Main2 {

	public static void main(String[] args) {
		int n,w;
		Scanner sc=new Scanner(System.in);
		w=sc.nextInt();
		n=sc.nextInt();
		int[] values = new int[w];
		for(int i=0;i<w;i++){
			values[i] = i+ 1;

		}
		for(int i= 0; i< n; i++) {
			String str= sc.next();
			String[] ab = str.split(",");
			int a = Integer.parseInt(ab[0]) -1;
			int b = Integer.parseInt(ab[1]) -1;
			int temp;
			temp=values[a];
			values[a]=values[b];
			values[b]=temp;
		}
		for(int i=0;i<5;i++)
			System.out.println(values[i]);
			}
	}

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

public class Main {

	public static void Main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int w = sc.nextInt();
		int[] a = new int[w+1];
		for(int i=1;i<=w;i++)a[i]=i;
		int m = sc.nextInt();
		while(m--!=0){
			String[] s = sc.next().split(",");
			int l = Integer.parseInt(s[0]);
			int r = Integer.parseInt(s[1]);
			int t = a[l];
			a[l] = a[r];
			a[r] = t;
		}
		for(int i=1;i<=w;i++)System.out.println(a[i]);
	}
}

Compiler output:
Main.java:4: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int w = sc.nextInt();
		int c = sc.nextInt();
		int a, b;
		int[] wide = new int[w];
		for (int i = 0; i < w; i++) {
			wide[i] = i + 1;
		}
		for (int i = 0; i < c; i++) {
			String line = sc.nextLine();
			a = Integer.parseInt(line.charAt(0));
			b = Integer.parseInt(line.charAt(2));
			swap(wide[a], wide[b]);
		}
		for (int i  = 0; i < w; i++) {
			System.out.println(wide[i]);
		}
	}
	public static void swap(int x, int y) {
		int z;
		z = x;
		x = y;
		y = z;
	}
}

Compiler output:
Main.java:15: error: incompatible types: char cannot be converted to String
			a = Integer.parseInt(line.charAt(0));
			                                ^
Main.java:16: error: incompatible types: char cannot be converted to String
			b = Integer.parseInt(line.charAt(2));
			                                ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
2 errors
Language: Java

import java.util.Scanner;
public class Main{
public static void main(String[] args){
	Scanner sc =new Scanner(System.in);
	int w = sc.nextInt();
	int n =sc.nextInt();
	int[] values =new int[w];
	for(int i=0;i<values.length;i++){
	values[i]=i+1;
	}
	for(int i=0;i<n;i++){
	String str =sc.next();
	String[] ab=str.split(",");
	int a =Integer.parseInt(ab[0])-1;
	int b =Interger.parseInt(ab[1])-1;
	int temp;
	temp=values[a];
	values[a]=values[b];
	values[b]=temp;
	}
	for(int i=0;i<w;i++){
	System.out.printf("%d\n",values[i]);
	}
}
}

Compiler output:
Main.java:15: error: cannot find symbol
	int b =Interger.parseInt(ab[1])-1;
	       ^
  symbol:   variable Interger
  location: class Main
1 error
Language: Java

import java.util.Scanner;
 
public class Main {
	static int[]z;
    public static int a,b,n,w,t;
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        w=sc.nextInt();
        n=sc.nextInt();
        z = new int[w];
        mmm();
        for(int i=0;i<w;i++)
            System.out.println(z[i]);
            }
    static void mmm(){
    	   for(int i=0;i<w;i++){
               z[i] = i+ 1;
           }
    	for(int i= 0; i< n; i++) {
            String mm= sc.next();
            String[] a1 = mm.split(",");
            a = Integer.parseInt(a1[0]) -1;
            b = Integer.parseInt(a1[1]) -1;
            t=z[a];
            z[a]=z[b];
            z[b]=t;
        }
    	
    	
    }
    }

Compiler output:
Main.java:20: error: cannot find symbol
            String mm= sc.next();
                       ^
  symbol:   variable sc
  location: class Main
1 error
Language: Java

import java.util.*;

class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int w=sc.nextInt();
int n=sc.nextInt();
int[] k=new int[w];
int p,q,r,s;
for(int i=0;i<w;i++){
k[i]=i+1;
}
for(int j=0;j<n;j++){
p=sc.nextInt();
q=sc.nextInt();
r=k[p-1];
s=k[q-1];
k[p-1]=s;
k[q-1]=r;
}
for(int k=0;k<w;k++){
System.out.println(k[k]);
}
}
}

Compiler output:
Main.java:21: error: variable k is already defined in method main(String[])
for(int k=0;k<w;k++){
        ^
Main.java:22: error: array required, but int found
System.out.println(k[k]);
                    ^
2 errors
Language: Java

import java.util.Scanner;

class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int w=sc.nextInt();
int n=sc.nextInt();
int[] k=new int[w];
int p,q,r;
for(int i=0;i<w;i++){
k[i]=i+1;
}
for(int j=0;j<n;j++){
String[] line=sc.nextLine.split(",");
p=Integer.perseInt(line[0]);
q=Integer.perseInt(line[1]);
r=k[p-1];
k[p-1]=k[q-1];
k[q-1]=r;
}
for(int l=0;l<w;l++){
System.out.println(k[l]);
}
}
}

Compiler output:
Main.java:14: error: cannot find symbol
String[] line=sc.nextLine.split(",");
                ^
  symbol:   variable nextLine
  location: variable sc of type Scanner
Main.java:15: error: cannot find symbol
p=Integer.perseInt(line[0]);
         ^
  symbol:   method perseInt(String)
  location: class Integer
Main.java:16: error: cannot find symbol
q=Integer.perseInt(line[1]);
         ^
  symbol:   method perseInt(String)
  location: class Integer
3 errors
Language: Java

import java.util.Scanner;

class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int w=sc.nextInt();
int n=sc.nextInt();
int[] k=new int[w];
for(int i=0;i<w;i++){
k[i]=i+1;
}
for(int j=0;j<n;j++){
String[] line=sc.nextLine().split(",");
int p=Integer.perseInt(line[0]);
int q=Integer.perseInt(line[1]);
int r=k[p-1];
k[p-1]=k[q-1];
k[q-1]=r;
}
for(int l=0;l<w;l++){
System.out.println(k[l]);
}
}
}

Compiler output:
Main.java:14: error: cannot find symbol
int p=Integer.perseInt(line[0]);
             ^
  symbol:   method perseInt(String)
  location: class Integer
Main.java:15: error: cannot find symbol
int q=Integer.perseInt(line[1]);
             ^
  symbol:   method perseInt(String)
  location: class Integer
2 errors
Language: Java

import java.util.Scanner;
public class AOJ {
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int w = sc.nextInt();
		int T[] = new int[w];
		for(int i=0;i<w;i++){
				T[i]=i+1;
				//System.out.println(T[i]);
			}
		int n = sc.nextInt();
			for(int i = 0;i<n;i++ ){
				int temp = 0;
				String A = sc.next();
				String[] fruit = A.split(",");
				int a = Integer.parseInt(fruit[0]);
				int b = Integer.parseInt(fruit[1]);
				temp = T[a-1];
				T[a-1]=T[b-1];
				T[b-1]=temp;
				
			}
			for(int i = 0;i<w;i++){
				System.out.println(T[i]);
			}
	}
}

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

public class Main {
	public static void main(String[] args) {

		Scanner sc = null;
		try {
			sc = new Scanner(System.in);
			// 縦線の数
			int w = sc.nextInt();
			// あみだのスタートライン
			int[] nums = new int[w];
			for (int i = 0; i < w; i++) {
				nums[i] = i + 1;
			}

			// 横線の数
			int n = sc.nextInt();

			// 横線を引く
			for (int i = 0; i < n; i++) {
				String[] input = sc.next().split(",");
				int a = Integer.parseInt(input[0]);
				int b = Integer.parseInt(input[1]);

				int work = nums[a - 1];
				nums[a - 1] = nums[b - 1];
				nums[b - 1] = work;
			}

			// 結果出力
			for (int result : nums) {
				System.out.println(result);
			}
		} finally {
			sc.close();
		}
	}
}

Compiler output:
Main.java:4: error: cannot find symbol
		Scanner sc = null;
		^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: cannot find symbol
			sc = new Scanner(System.in);
			         ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		int w=sc.nextInt();
		int num[]=new int[w+1];
		for(int i=1;i<=w;i++){
			num[i]=i;
		}

		int n=sc.nextInt();
		for(int i=0;i<n;i++){
			String[] str=sc.next().split(",");
			int a=Integer.parseInt(str[0]);
			int b=Integer.parseInt(str[1]);
			int c=num[a];
			num[a]=num[b];
			num[b]=c;
		}

		for(int i=1;i<=w;i++){
			System.out.println(num[i]);
		}
		sc.close();
	}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args){
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

import java.util.Scanner;
public class pro4_3 {
public static void main(String[] args) {
// 標準入力からデータを読み込む準備
Scanner sc= new Scanner(System.in);
int w = sc.nextInt();
int n = sc.nextInt();
int[] values = new int[w];
for(int i= 0; i< values.length; i++) {
values[i] = i+ 1;
}
for(int i= 0; i< n; i++) {
String str= sc.next();
String[] ab = str.split(",");
int a = Integer.parseInt(ab[0]) -1;
int b = Integer.parseInt(ab[1]) -1;
// aとbを使ってvaluesを操作しよう
int c=0;
c=values[a];
values[a]=values[b];
values[b]=c;
}
// valuesを出力しよう
for(int i= 0; i<= n; i++) {
	System.out.println(values[i]);
}
System.out.println('\n');
}
}

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