semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	int n,i,j,t,q,s;//n??????i,j??????t??????????q,s?????????????
	cin>>n;//??n
	t=n*(n-1)/2;//??t
	int x[n+1],y[n+1],z[n+1],a[t+1],b[t+1];//???????a[n+1],b[n+1]??????????????
	float dis[t+1],p;//???p?????
	for(i=1;i<=n;i++)//?????????
	{
		cin>>x[i]>>y[i]>>z[i];
	}
	for(i=1;i<=n-1;i++)//???????????????????????
	{
		for(j=i+1;j<=n;j++)
		{
			dis[(2*n-i)*(i-1)/2+j-i]=sqrt((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j])+(z[i]-z[j])*(z[i]-z[j]));
			a[(2*n-i)*(i-1)/2+j-i]=i;
			b[(2*n-i)*(i-1)/2+j-i]=j;
		}
	}
	for(j=1;j<=t;j++)//????
	{
		for(i=1;i<=t;i++)
		{
			if(dis[i]<dis[i+1])
			{
				p=dis[i];
				dis[i]=dis[i+1];
				dis[i+1]=p;
				q=a[i];
				a[i]=a[i+1];
				a[i+1]=q;
				s=b[i];
				b[i]=b[i+1];
				b[i+1]=s;
			}
		}
	}
	for(i=1;i<=t;i++)//????
	{
		cout<<"("<<x[a[i]]<<","<<y[a[i]]<<","<<z[a[i]]<<")-("<<x[b[i]]<<","<<y[b[i]]<<","<<z[b[i]]<<")="<<fixed<<setprecision(2)<<dis[i]<<endl;
	}
	return 0;
}
/*
 * fuck.cpp
 *
 *  Created on: 2011-12-16
 *      Author: guan hong wei
 */
struct locations//????,????
{
int x;
int y;
int z;
}locations[100];
struct distances//?????????
{
int i;
int j;
double distance;
}distances[100];
struct distances m;
int main()
{
int n,i,j,t=0;
cin>>n;//?????
for(i=0;i<n;i++)
{
cin>>locations[i].x>>locations[i].y>>locations[i].z;//??????
}
for(i=0;i<n;i++)
{
for(j=i+1;j<n;j++)
{
distances[t].i=i;
distances[t].j=j;
distances[t].distance=sqrt((double)(pow(locations[i].x-locations[j].x,2.0)+pow(locations[i].y-locations[j].y,2.0)+pow(locations[i].z-locations[j].z,2.0)));//????
t++;
}
}
for(i=0;i<t;i++)//???????????
{
for(j=t-1;j>i;j--)
{
if(distances[j].distance>distances[j-1].distance)
{
m=distances[j];
distances[j]=distances[j-1];
distances[j-1]=m;
}
}
}
for(i=0;i<t;i++)
{
cout<<'('<<locations[distances[i].i].x<<','<<locations[distances[i].i].y<<','<<locations[distances[i].i].z<<')'<<'-'<<'('<<locations[distances[i].j].x<<','<<locations[distances[i].j].y<<','<<locations[distances[i].j].z<<")="<<fixed<<setprecision(2)<<distances[i].distance<<endl;
}
return 0;
}
int main()
{
	int i,j,k,l,n,m,a[10],b[10],c[10],z[50],x[50],v[50],s[50],d[50],f[50],q,w,r,t,o,u;
	double y[50],jl[50],e;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d%d%d",&a[i],&b[i],&c[i]);
	}
	m=n*(n-1)/2;
	k=0;
	for(i=0;i<n;i++)
	{
		for(j=i+1;j<n;j++)
		{
			y[k]=1.0*((a[j]-a[i])*(a[j]-a[i])+(b[j]-b[i])*(b[j]-b[i])+(c[j]-c[i])*(c[j]-c[i]));
			jl[k]=sqrt(y[k]);
			z[k]=a[i];
			x[k]=b[i];
			v[k]=c[i];
			s[k]=a[j];
			d[k]=b[j];
			f[k]=c[j];
			k++;
		}
	}

for(l=1;l<=m;l++)
{
	for(i=0;i<m-l;i++)
	{
		if(jl[i]<jl[i+1])
		{
			e=jl[i];
			jl[i]=jl[i+1];
			jl[i+1]=e;
			q=z[i];
			z[i]=z[i+1];
			z[i+1]=q;
			w=x[i];
			x[i]=x[i+1];
			x[i+1]=w;
			r=v[i];
			v[i]=v[i+1];
			v[i+1]=r;
			t=s[i];
			s[i]=s[i+1];
			s[i+1]=t;
			o=d[i];
			d[i]=d[i+1];
			d[i+1]=o;
			u=f[i];
			f[i]=f[i+1];
			f[i+1]=u;


		}
	}
}
for(i=0;i<m;i++)
{
	printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",z[i],x[i],v[i],s[i],d[i],f[i],jl[i]);
}
return 0;
}
/**
* @file 1.cpp
* @author ???
* @date 2011-12?07
* @description
* ??????:????
*/

int main()
{
	int n, d[101][3];
	int i, j, k, m1, m2;
	int (*p)[3];
	p = d;
	double l[10][10], max = 0;
	cin >> n;
	for (i = 0; i < n; i++)
	{
		cin >>*(*(p + i)) >> *(*(p + i) + 1) >> *(*(p + i) + 2); // ??i??????
	}
	for (i = 0; i < n - 1; i++)
	{
		for (j = i + 1; j < n; j++)
		{
			l[i][j] = sqrt((double)(*(*(p + i)) - *(*(p + j))) * (*(*(p + i)) - *(*(p + j))) +
				(*(*(p + i) + 1) - *(*(p + j) + 1)) * (*(*(p + i) + 1) - *(*(p + j) + 1)) + 
				(*(*(p + i) + 2) - *(*(p + j) + 2)) * (*(*(p + i) + 2) - *(*(p + j) + 2)));
		} // ????????
	}
	for (k = 0; k < n * (n - 1) / 2; k++)
	{
		for (i = 0; i < n - 1; i++)
		{
			for (j = i + 1; j < n; j++)
			{
				if (l[i][j] > max)
				{
					max = l[i][j];
					m1 = i;
					m2 = j; // ?????????
				}
			}
		}
		cout << '(' << *(*(p + m1)) << ',' << *(*(p + m1) + 1) << ',' << *(*(p + m1) + 2) << ")-(";
		cout << *(*(p + m2)) << ',' << *(*(p + m2) + 1) << ',' << *(*(p + m2) + 2) << ')' << '=' ;
		cout << fixed << setprecision(2) << l[m1][m2] << endl;
		l[m1][m2] = 0; // ??????????????????????
		max = 0;
	}
	return 0;
}
int main()
{
int M;
M=N*(N-1)/2;
int x[N],y[N],z[N],d[M],a[M],b[M],p=0,i,j,n,k,m;
double c;
scanf("%d",&n);
printf("\n");
for(i=0;i<n;i++)
scanf("%d%d%d",&x[i],&y[i],&z[i]);
printf("\n");
for(i=0;i<n;i++)
for(j=i+1;j<n;j++)
{
d[p]=(x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j])+(z[i]-z[j])*(z[i]-z[j]);
a[p]=i;
b[p]=j;
p++;
}
for(j=1;j<=p;j++)
for(i=0;i<p-j;i++)
if(d[i]<d[i+1])
{
d[i]=d[i]+d[i+1];
d[i+1]=d[i]-d[i+1];
d[i]=d[i]-d[i+1];
a[i]=a[i]+a[i+1];
a[i+1]=a[i]-a[i+1];
a[i]=a[i]-a[i+1];
b[i]=b[i]+b[i+1];
b[i+1]=b[i]-b[i+1];
b[i]=b[i]-b[i+1];
}
for(i=0;i<p;i++)
{
k=a[i];
m=b[i];
c=sqrt(d[i]);
printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",x[k],y[k],z[k],x[m],y[m],z[m],c);
}
return 0;
}
typedef struct Point
{
int x;
int y;
int z;
}Point; 
double Distance(Point *p1,Point *p2)
{
int x=(p1->x)-(p2->x);
int y=(p1->y)-(p2->y);
int z=(p1->z)-(p2->z);
double temp=(double)(x*x+y*y+z*z);
return sqrt(temp);
}
void Input(Point *p[],int n)
{
int i;
for(i=0;i<n;i++)
{
p[i]=(Point *)malloc(sizeof(Point)); 
scanf("%d",&p[i]->x);
scanf("%d",&p[i]->y);
scanf("%d",&p[i]->z);
}
}
void Output(Point *p1,Point *p2)
{
printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n\n",p1->x,p1->y,p1->z,p2->x,p2->y,p2->z,Distance(p1,p2));

}
int main()
{
int n,i,j;

scanf("%d",&n);
Point *p[10];
Input(p,n);
double a[10*(10-1)/2];
int k=0;
for(i=0;i<n;i++)
{
for(j=i+1;j<n;j++)
{	int t=0;
while(t<k+1 &&(a[t]-Distance(p[i],p[j])>0.00001 ||Distance(p[i],p[j])-a[t]>0.00001))	t++;
if(t==k+1){	a[k]=Distance(p[i],p[j]);  k++; }

}
}
int count=k;
for(i=0;i<count;i++)
{
for(j=i+1;j<count;j++)
{
if(a[i]<a[j])
{	double temp=a[i]; a[i]=a[j]; a[j]=temp;	}
}
}

k=0;
while(k<count)
{
for(i=0;i<n;i++)
{
for(j=i+1;j<n;j++)
{	if(a[k]>Distance(p[i],p[j]))
{	if(a[k]-Distance(p[i],p[j])<0.000001)
Output(p[i],p[j]);
}
else
{
if(Distance(p[i],p[j])-a[k]<0.000001)
Output(p[i],p[j]);
}
}
}
k++;
}
}
struct 
{
    int x,y,z;
}a[12];

struct 
{
    int x1,x2,y1,y2,z1,z2;
    double l;
}dis[120],t;
void sort(int a)
{
     for (int i=0; i<a; i++)
     for (int j=0; j<a-1-i; j++)
     {
         
         if (dis[j].l < dis[j+1].l)
         {
             t= dis[j];
             dis[j] = dis[j+1];
             dis[j+1] = t;          
         }
     }
     for (int i=0; i<a; i++)
     {  
         cout << "(" << dis[i].x1 << "," << dis[i].y1 << "," << dis[i].z1
         << ")-(" << dis[i].x2 << "," << dis[i].y2 << "," << dis[i].z2 <<
         ")=" << fixed << setprecision(2) << dis[i].l <<endl;
     }
}
         
int main()
{
    int n;
    cin >> n;
    for (int i=0; i<n; i++)
    {
        cin >> a[i].x >> a[i].y >> a[i].z ;
    }
    int count = 0;
    for (int i=0; i<n; i++)
    {
        for (int j=i+1; j<n; j++)
        {
            
            dis[count].l = sqrt((a[i].x-a[j].x)*(a[i].x-a[j].x)+(a[i].y-a[j].y)
            *(a[i].y-a[j].y)+(a[i].z-a[j].z)*(a[i].z-a[j].z));
            dis[count].x1 = a[i].x;
            dis[count].x2 = a[j].x;
            dis[count].y1 = a[i].y;
            dis[count].y2 = a[j].y;
            dis[count].z1 = a[i].z;
            dis[count].z2 = a[j].z;
            count++;
        }
    }
    sort (count);           
    cin >> n;
    return 0;
}
void main()
{
	int i,j,k,b,c,n;
	double s[100][100],max,a[100][3];
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%lf %lf %lf",&a[i][0],&a[i][1],&a[i][2]);
	for(i=0;i<n;i++)
		for(j=i+1;j<n;j++)
			s[i][j]=sqrt(((a[i][0]-a[j][0])*(a[i][0]-a[j][0])+(a[i][1]-a[j][1])*(a[i][1]-a[j][1])+(a[i][2]-a[j][2])*(a[i][2]-a[j][2])));
	for(k=0;k<(n*(n-1)/2);k++)
	{
		max=0;
		for(i=0;i<n;i++)
			for(j=i+1;j<n;j++)
			{	
				if(s[i][j]>max)
				{
					max=s[i][j];
					b=i;
					c=j;
				}
			}
		printf("(%.0lf,%.0lf,%.0lf)-(%.0lf,%.0lf,%.0lf)=%.2lf\n",a[b][0],a[b][1],a[b][2],a[c][0],a[c][1],a[c][2],max);
		s[b][c]=0;
	}
}
int main(){
  int n,i,s,j,b;
  b=0;
  int x[11],y[11],z[11],a[46],c[46];
  double d[46];
  double t,f;
  scanf("%d",&n);
  for(i=0;i<n;i++){
     scanf("%d %d %d",&x[i],&y[i],&z[i]);
  }
  s=n*(n-1)/2;
  for(i=0;i<n;i++){
     for(j=i+1;j<n;j++){
        f=(x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j])+(z[i]-z[j])*(z[i]-z[j]);
        t=sqrt(f);
          d[b]=t;
          a[b]=i;
          c[b]=j;
          b++;
     }
  }
  for(int k=1;k<=s;k++){
     for(b=0;b<s-k;b++){
          if(d[b]>d[b+1]){
             double e=d[b+1];
             d[b+1]=d[b];
             d[b]=e;
             int g=a[b+1];
             a[b+1]=a[b];
             a[b]=g;
             int u=c[b+1];
             c[b+1]=c[b];
             c[b]=u;
          }else{
             if(d[b]==d[b+1]){
                 if(a[b]<a[b+1]){
                 double o=d[b+1];
                 d[b+1]=d[b];
                 d[b]=o;
                 int p=a[b+1];
                 a[b+1]=a[b];
                 a[b]=p;
                 int q=c[b+1];
                 c[b+1]=c[b];
                 c[b]=q;
                 }else{
                    if(a[b]==a[b+1]){
                       if(c[b]<c[b+1]){
                          double o=d[b+1];
                          d[b+1]=d[b];
                          d[b]=o;
                          int p=a[b+1];
                          a[b+1]=a[b];
                          a[b]=p;
                          int q=c[b+1];
                          c[b+1]=c[b];
                          c[b]=q;
                       }
                    }
                 }   
                 }
             }
          }   
      }
   for(b=s-1;b>=0;b--){
      printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",x[(a[b])],y[(a[b])],z[(a[b])],x[(c[b])],y[(c[b])],z[(c[b])],d[b]);
   }
   return 0;
   }
int main ()
{
	int a[10][3] = {0};					//????????
	int n = 0;							//??n??????
	cin >> n;
	int i = 0, j = 0, k = 0;			//????????
	for ( i = 0; i < n; i ++ )			//??????
		for ( j = 0; j < 3; j ++ )
			cin >> a[i][j];
	double distance[100] = {0};			//???????????
	double dis = 0;						//?????
	for ( i = 0; i < n; i ++ )			//??????
		for ( j = i + 1; j < n; j ++ )
		{
			for ( k = 0; k < 3; k ++ )
				dis = dis + (a[i][k]-a[j][k])*(a[i][k]-a[j][k]);
			distance[i*10+j] = sqrt(dis);
			dis = 0;
		}
	int b[100] = {0};					//????????????
	for ( i = 0; i < 100; i ++ )
		b[i] = i;
	for ( i = 0; i < 99; i ++ )			//?????
		for ( j = 0; j < 99 - i; j ++ )
		{
			if ( distance[j] < distance[j+1] )
			{
				swap ( distance[j], distance[j+1] );
				swap ( b[j], b[j+1] );
			}
		}
	for ( i = 0; i < n*(n-1)/2; i ++ )	//????????????
	{
		cout << "(" << a[b[i]/10][0] << "," << a[b[i]/10][1] << "," << a[b[i]/10][2] << ")-(";
		cout << a[b[i]%10][0] << "," << a[b[i]%10][1] << "," << a[b[i]%10][2] << ")=";
		printf ( "%.2f", distance[i] );
		cout << endl;
	}
	return 0;
}
int main(){
int n,x[10],y[10],z[10],xx1[50],yy1[50],zz1[50],xx2[50],yy2[50],zz2[50],i,t,k=0,e;
double j[10][10],jj[50],f;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d%d",&x[i],&y[i],&z[i]);
}
for(i=0;i<n;i++){
for(t=0;t<n;t++){
j[i][t]=sqrt((x[i]-x[t])*(x[i]-x[t])+(y[i]-y[t])*(y[i]-y[t])+(z[i]-z[t])*(z[i]-z[t]));
}
}
for(i=0;i<n;i++){
for(t=i+1;t<n;t++){
jj[k]=j[i][t];
xx1[k]=x[i];
xx2[k]=x[t];
yy1[k]=y[i];
yy2[k]=y[t];
zz1[k]=z[i];
zz2[k]=z[t];
k++;
}
}
for(i=1;i<=k+1;i++){
for(t=0;t<k-1;t++){
if(jj[t]<jj[t+1]){
f=jj[t+1];
jj[t+1]=jj[t];
jj[t]=f;
e=xx1[t+1];
xx1[t+1]=xx1[t];
xx1[t]=e;
e=yy1[t+1];
yy1[t+1]=yy1[t];
yy1[t]=e;
e=zz1[t+1];
zz1[t+1]=zz1[t];
zz1[t]=e;
e=xx2[t+1];
xx2[t+1]=xx2[t];
xx2[t]=e;
e=yy2[t+1];
yy2[t+1]=yy2[t];
yy2[t]=e;
e=zz2[t+1];
zz2[t+1]=zz2[t];
zz2[t]=e;
}
}
}
for(i=0;i<k;i++){
printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",xx1[i],yy1[i],zz1[i],xx2[i],yy2[i],zz2[i],jj[i]);
}
return 0;
}
int main()
{
    int n;
    float distance[150];
    int k=1;
    int i=1,j=1,t=1;
    double temp; 
    struct point
    {
           int x,y,z;
    }
    stu1[12];
    struct ttt
    {
           int x1,y1,z1;
           int x2,y2,z2;
    }
    stu2[150];       
    scanf("%d",&n);
  for(i=1;i<=n;i++)
    scanf("%d %d %d",&stu1[i].x,&stu1[i].y,&stu1[i].z);
  for(i=1;i<=n-1;i++)
    {
    for(j=i+1;j<=n;j++)
      {
      distance[k]=(float)sqrt((stu1[i].x-stu1[j].x)*(stu1[i].x-stu1[j].x)+(stu1[i].y-stu1[j].y)*(stu1[i].y-stu1[j].y)
                  +(stu1[i].z-stu1[j].z)*(stu1[i].z-stu1[j].z));
                  stu2[k].x1=stu1[i].x;
                  stu2[k].y1=stu1[i].y;
                  stu2[k].z1=stu1[i].z;
                  stu2[k].x2=stu1[j].x;
                  stu2[k].y2=stu1[j].y;
                  stu2[k].z2=stu1[j].z;
                  k++;//k=0--k=n-1*n-2/2
      }
    }
    t=k-1;//eg:n=4 k=7 t=6
     for(j=0;j<=t-1;j++)//????
     {
    for(i=1;i<=t-j;i++)
     {
     if(distance[i]<distance[i+1])
       {
       temp=distance[i];
       distance[i]=distance[i+1];
       distance[i+1]=temp;
       
       temp=stu2[i].x1;
       stu2[i].x1=stu2[i+1].x1;
       stu2[i+1].x1=temp;
      
       temp=stu2[i].y1;
       stu2[i].y1=stu2[i+1].y1;
       stu2[i+1].y1=temp;
       
       temp=stu2[i].z1;
       stu2[i].z1=stu2[i+1].z1;
       stu2[i+1].z1=temp;
       
       temp=stu2[i].x2;
       stu2[i].x2=stu2[i+1].x2;
       stu2[i+1].x2=temp;
      
       temp=stu2[i].y2;
       stu2[i].y2=stu2[i+1].y2;
       stu2[i+1].y2=temp;
       
       temp=stu2[i].z2;
       stu2[i].z2=stu2[i+1].z2;
       stu2[i+1].z2=temp;
       
       
       }
       }
     } 
     for(k=1;k<=t;k++)
      printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",stu2[k].x1,stu2[k].y1,stu2[k].z1,stu2[k].x2,stu2[k].y2,stu2[k].z2,distance[k]);
        return 0;
}
struct point{
	int x;
	int y;
	int z;
};
struct diskumi{
	struct point po1;
	struct point po2;
	double dist;
};
int main()
{
	int n;
	int xa[15],ya[15],za[15];
	struct diskumi dis[45];
	int baka;
	double cir;
	int i,j,k=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d %d %d",&xa[i],&ya[i],&za[i]);
	for(i=0;i<n;i++)
	{
		for(j=i+1;j<n;j++)
		{
			dis[k].po1.x=xa[i];
			dis[k].po1.y=ya[i];
			dis[k].po1.z=za[i];
			dis[k].po2.x=xa[j];
			dis[k].po2.y=ya[j];
			dis[k].po2.z=za[j];
			dis[k].dist=sqrt((xa[i]-xa[j])*(xa[i]-xa[j])+(ya[i]-ya[j])*(ya[i]-ya[j])+(za[i]-za[j])*(za[i]-za[j]));
			k++;
		}
	}
	for(i=0;i<k-1;i++)
	{
		for(j=0;j<k-i-1;j++)
		{
			if(dis[j+1].dist>dis[j].dist)
			{
				baka=dis[j].po1.x;
				dis[j].po1.x=dis[j+1].po1.x;
				dis[j+1].po1.x=baka;
				baka=dis[j].po1.y;
				dis[j].po1.y=dis[j+1].po1.y;
				dis[j+1].po1.y=baka;
				baka=dis[j].po1.z;
				dis[j].po1.z=dis[j+1].po1.z;
				dis[j+1].po1.z=baka;

				baka=dis[j].po2.x;
				dis[j].po2.x=dis[j+1].po2.x;
				dis[j+1].po2.x=baka;
				baka=dis[j].po2.y;
				dis[j].po2.y=dis[j+1].po2.y;
				dis[j+1].po2.y=baka;
				baka=dis[j].po2.z;
				dis[j].po2.z=dis[j+1].po2.z;
				dis[j+1].po2.z=baka;

				cir=dis[j].dist;
				dis[j].dist=dis[j+1].dist;
				dis[j+1].dist=cir;
			}
		}
	}
	k--;
	printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf",dis[0].po1.x,dis[0].po1.y,dis[0].po1.z,dis[0].po2.x,dis[0].po2.y,dis[0].po2.z,dis[0].dist);
	for(i=1;i<=k;i++)
	{
		printf("\n(%d,%d,%d)-(%d,%d,%d)=%.2lf",dis[i].po1.x,dis[i].po1.y,dis[i].po1.z,dis[i].po2.x,dis[i].po2.y,dis[i].po2.z,dis[i].dist);
	}
}
int main(){
    int n,a,m,js=0,p=0,q,e;
    scanf("%d\n",&n);
    int x[n-1],y[n-1],z[n-1];
    double jg[100],o;
    for(int i=0;i<100;i++){
        jg[i]=-1;
    }
    for(int i=0;i<n;i++){
        scanf("%d%d%d",&x[i],&y[i],&z[i]);
    }
    for(int i=0;i<n-1;i++){
        for(int k=i+1;k<n;k++){
            a=10*i+k;
            jg[a]=sqrt((x[i]-x[k])*(x[i]-x[k])+(y[i]-y[k])*(y[i]-y[k])+(z[i]-z[k])*(z[i]-z[k]));
        }
    }
    o=0;
    m=n*(n-1)/2;
    for(int i=0;i<100;i++){
        if(js==m){
            break;
        }
        if(o<jg[i]){
            o=jg[i];
            p=i; 
        }
        if(i==99){
            q=p/10;
            n=p-q*10;
            printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",x[q],y[q],z[q],x[n],y[n],z[n],o);
            jg[p]=-1;
            i=-1;
            o=0;
            js++;
        }
    }
    return 0;
}
int main()
{
	float point[10][3],distant[45],t;
	int n,i,j,k=0,p,d[45][2];
	cin>>n;
	for(i=0;i<n;i++)
		for(j=0;j<3;j++)
			cin>>point[i][j];    //i???????j?????????
	for(i=0;i<n;i++)
		for(j=i+1;j<n;j++,k++){//distant????????????d??????????????
			distant[k]=sqrt(pow((point[i][0]-point[j][0]),2)+pow((point[i][1]-point[j][1]),2)+pow((point[i][2]-point[j][2]),2));
			d[k][0]=i;d[k][1]=j;}
	for(i=1;i<n*(n-1)/2;i++) //?????????distance????
		for(j=0;j<n*(n-1)/2-i;j++)
			if(distant[j]<distant[j+1]){
				t=distant[j];
				distant[j]=distant[j+1];
				distant[j+1]=t;
				p=d[j][0];
				d[j][0]=d[j+1][0];
				d[j+1][0]=p;
				p=d[j][1];
				d[j][1]=d[j+1][1];
				d[j+1][1]=p;}
	for(k=0;k<(n*(n-1)/2);k++)//????
		cout<<'('<<fixed<<setprecision(0)<<point[d[k][0]][0]<<','<<point[d[k][0]][1]<<','<<
		point[d[k][0]][2]<<')'<<'-'<<'('<<point[d[k][1]][0]<<','<<
		point[d[k][1]][1]<<','<<point[d[k][1]][2]<<')'<<'='<<fixed<<setprecision(2)<<distant[k]<<endl;
	return 0;
}
typedef struct Point
{
	int x,y,z;
}Point;

typedef struct Distance
{
	double len;
	int pt1,pt2;
}Distance;

double CalDis(Point pt1,Point pt2)
{
	return sqrt((double)(pt1.x-pt2.x)*(pt1.x-pt2.x)+(pt1.y-pt2.y)*(pt1.y-pt2.y)+(pt1.z-pt2.z)*(pt1.z-pt2.z));
}

int cmp( const void *a ,const void *b)
{
	if((*(Distance *)b).len != (*(Distance *)a).len)
		return (*(Distance *)b).len > (*(Distance *)a).len ? 1 : -1;
	else
		return (*(Distance *)a).pt1 > (*(Distance *)b).pt1 ? 1 : -1;
}

Distance ds[N];

int main()
{
	int n,count=0,i,j;
	Point pts[11];
	
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d %d %d",&pts[i].x,&pts[i].y,&pts[i].z);

	for(i=0;i<n;i++)
		for(j=i+1;j<n;j++)
		{
			ds[count].len=CalDis(pts[i],pts[j]);
			ds[count].pt1=i;
			ds[count++].pt2=j;
		}

	qsort(ds,count,sizeof(ds[0]),cmp);

	for(i=0;i<count;i++)
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",pts[ds[i].pt1].x,pts[ds[i].pt1].y,
		pts[ds[i].pt1].z,pts[ds[i].pt2].x,pts[ds[i].pt2].y,pts[ds[i].pt2].z,ds[i].len);

	
	return 0;
}
int main()
{
   int n,i,j,k,r,c;
   float a[10][3],b[11][11],sum,max;
   cin>>n;
   for(i=0;i<n;i++)
   {
	 for(j=0;j<3;j++)
         cin>>a[i][j];
   }
   for(i=0;i<n-1;i++)
    {
       for(k=i+1;k<n;k++)
      { 
        sum=0;
        for(j=0;j<3;j++)
        {
          sum=sum+(a[i][j]-a[k][j])*(a[i][j]-a[k][j]);
         }
        b[i][k]=sqrt(sum);
      }
   }
   for(j=0;j<(n-1)*n/2;j++)
  {
	 max=0;
	 for(i=0;i<n-1;i++)
	 {
		 for(k=i+1;k<n;k++)
		 {
		     if(b[i][k]>max)
			 {
		           max=b[i][k];
	                   r=i;
			   c=k;
	                 }
		  } 
	 }
     b[r][c]=0;   
     cout<<'('<<a[r][0]<<','<<a[r][1]<<','<<a[r][2]<<')'<<'-'<<'('<<a[c][0]<<','<<a[c][1]<<','<<a[c][2]<<')'<<'=';
     printf("%.2f\n",max);
   } 
   return 0;
}
double cal(int a[3],int b[3])
{
	int i=0,sum=0;
	for(;i<3;i++)
		sum+=(a[i]-b[i])*(a[i]-b[i]);
	return sqrt(sum);
}
int change(double a[7],double b[7])
{
	double temp;
	int i;
	for(i=0;i<7;i++)
	{
		temp=a[i];
		a[i]=b[i];
		b[i]=temp;
	}
	return 0;
}
void main()
{
	int i,j,n,a[10][3],k1=0,k2;
	double b[60][7];
	scanf("%d",&n);
	for(i=0;i<n;i++)
		for(j=0;j<3;j++)
			scanf("%d",&a[i][j]);
	for(i=0;i<n-1;i++)
		for(j=i+1;j<n;j++)
		{

			for(k2=0;k2<3;k2++)
				b[k1][k2]=a[i][k2];
			for(k2=0;k2<3;k2++)
				b[k1][k2+3]=a[j][k2];
			b[k1][6]=cal(a[i],a[j]);
			k1++;
		}
	for(i=0;i<k1;i++)
		for(j=0;j<k1-1;j++)
			if(b[j][6]<b[j+1][6])
				change(b[j],b[j+1]);
	for(i=0;i<k1;i++)
		printf("(%.0lf,%.0lf,%.0lf)-(%.0lf,%.0lf,%.0lf)=%.2lf\n",b[i][0],b[i][1],b[i][2],b[i][3],b[i][4],b[i][5],b[i][6]);


}
int main(){
	int n,i,j,k=0,p,q;
	double t;
	scanf("%d",&n);
	double x[200];
	double y[200];
	double z[200];
	double jl[200][200];
	double jljl[200];
	double dhi[200];
	double dhj[200];
	for(i=0;i<n;i++){
		scanf("%lf",&(x[i]));
		scanf("%lf",&(y[i]));
		scanf("%lf",&(z[i]));
	}
	for(i=0;i<n;i++){
		for(j=i+1;j<n;j++){
			jl[i][j]=sqrt(((x[j])-(x[i]))*((x[j])-(x[i]))+((y[j])-(y[i]))*((y[j])-(y[i]))+((z[j])-(z[i]))*((z[j])-(z[i])));
			jljl[k]=jl[i][j];
			dhi[k]=i;
			dhj[k]=j;
			k++;
		}
	}
	for(i=0;i<n*(n-1)/2;i++){
		for(j=n*(n-1)/2-1;j>i;j--){
			if(jljl[j]>jljl[j-1]){
				t=jljl[j];
				jljl[j]=jljl[j-1];
				jljl[j-1]=t;
				t=dhi[j];
				dhi[j]=dhi[j-1];
				dhi[j-1]=t;
				t=dhj[j];
				dhj[j]=dhj[j-1];
				dhj[j-1]=t;
			}
		}
	}
	k=0;
	for(i=0;i<n;i++){
		for(j=i+1;j<n;j++){
			jl[i][j]=jljl[k];
			p=(int)dhi[k];
			q=(int)dhj[k];
			k++;
			printf("(%.0lf,%.0lf,%.0lf)-(%.0lf,%.0lf,%.0lf)=%.2lf\n",x[p],y[p],z[p],x[q],y[q],z[q],jl[i][j]);
		}
	}
	return 0;
}
int main()
{
	int n;
	int i,j,k=0;
	struct point
	{
		int x;
		int y;
		int z;
	}p[10];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d%d%d",&p[i].x,&p[i].y,&p[i].z);
	}
	struct distant
	{
		struct point p1,p2;
		double r;
	}d[45],t;
	for(i=0;i<n;i++)
	{
		for(j=i+1;j<n;j++,k++)
		{
			d[k].p1=p[i];
			d[k].p2=p[j];
			d[k].r=sqrt(1.0*((d[k].p1.x-d[k].p2.x)*(d[k].p1.x-d[k].p2.x)+(d[k].p1.y-d[k].p2.y)*(d[k].p1.y-d[k].p2.y)+(d[k].p1.z-d[k].p2.z)*(d[k].p1.z-d[k].p2.z)));
	        if(k>n*(n-1)/2)
			    break;		
		}
		if(k>n*(n-1)/2)
			break;
	}

    for(i=k-1;i>0;i--)
    {
        for(j=0;j<i;j++)
        {
            if(d[j].r<d[j+1].r)
			{
                t=d[j];
				d[j]=d[j+1];
				d[j+1]=t;
			}
		
        }
        
    }
	 for(i=0;i<k;i++)
	 {
		 printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",d[i].p1.x,d[i].p1.y,d[i].p1.z,d[i].p2.x,d[i].p2.y,d[i].p2.z,d[i].r);
	 }
	 return 0;
}
int main(){
int i,j,m=0,n,x[10],y[10],z[10],a,b,c,e,f,g,x1[55],y1[55],z1[55],x2[55],y2[55],z2[55];
double jl[55],d;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d%d",&x[i],&y[i],&z[i]);
}
for(i=0;i<n-1;i++){
	for(j=i+1; j<n; j++){
		jl[m]=sqrt(pow(x[i]-x[j],2)+pow(y[i]-y[j],2)+pow(z[i]-z[j],2));
		x1[m]=x[i];x2[m]=x[j];y1[m]=y[i];y2[m]=y[j];z1[m]=z[i];z2[m]=z[j];
		m++;
	}
}
for(j=0;j<m-1;j++){
     for(i=0;i<m-j-1;i++){
     if(jl[i]<jl[i+1]){
     d=jl[i+1];jl[i+1]=jl[i];jl[i]=d;
     a=x1[i+1];x1[i+1]=x1[i];x1[i]=a;
     b=x2[i+1];x2[i+1]=x2[i];x2[i]=b;
     c=y1[i+1];y1[i+1]=y1[i];y1[i]=c;
     e=y2[i+1];y2[i+1]=y2[i];y2[i]=e;
     f=z1[i+1];z1[i+1]=z1[i];z1[i]=f;
     g=z2[i+1];z2[i+1]=z2[i];z2[i]=g;
     }
   }
}
	for(i=0;i<m;i++){
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",x1[i],y1[i],z1[i],x2[i],y2[i],z2[i],jl[i]);
	}
return 0;
}
int main()
{
	int n,i,j,m=0,k,s,t;
	cin >> n;
	double d[101][101];
	struct point
	{
		int x;
		int y;
		int z;
	}p[11];

	for (i=0;i<=n-1;i++)
	{
		cin >> p[i].x >> p[i].y >> p[i].z;
	}
	for (i=0;i<n;i++)
	{
		for (j=i+1;j<n;j++)
		{
			d[i][j]=sqrt((p[i].x-p[j].x)*(p[i].x-p[j].x)+(p[i].y-p[j].y)*(p[i].y-p[j].y)+(p[i].z-p[j].z)*(p[i].z-p[j].z));
		}
	}
	for (t=0;t<(n*(n+1))/2;t++)
	{
		for (i=0;i<n;i++)
	{
		for (j=i+1;j<n;j++)
		{
			m=0;
			for (k=0;k<n;k++)
			{
				for (s=k+1;s<=n;s++)
				{
					if (d[i][j]<d[k][s])
						m++;
				}
			}
			if (m==t)
			{
				cout<< "(" << p[i].x << "," << p[i].y << "," << p[i].z << ")"<< "-" <<"(" << p[j].x << "," << p[j].y << "," << p[j].z << ")"<< "=" << fixed << setprecision (2) << d[i][j] << endl;
			}

		}
		}
	}
	return 0;
}
struct distants
{double d;
int x;
int y;
}b[45],mid;

int main()
{int n,i,j,num=0;
int a[10][3];
struct distants b[45],mid;

scanf("%d",&n);
if(n<=10){
	for(i=0;i<n;i++){
		for(j=0;j<3;j++)
		{scanf("%d",&a[i][j]);}
	}
	for(i=0;i<n;i++){
		for(j=i+1;j<n;j++){
		b[num].d=sqrt((double)((a[i][0]-a[j][0])*(a[i][0]-a[j][0])+(a[i][1]-a[j][1])*(a[i][1]-a[j][1])+(a[i][2]-a[j][2])*(a[i][2]-a[j][2])));
		b[num].x=i;
		b[num].y=j;
		num++;
		}
	}//????num????b[num-1].d

	for(i=1;i<num;i++)
		{  
			for(j=1;j<=num-i;j++)
			{  
				if((b[j-1].d<b[j].d)||((b[j-1].d-b[j].d<1e-6)&&(b[j-1].x>b[j].x))||((b[j-1].d-b[j].d<1e-6)&&(b[j-1].x==b[j].x)&&(b[j-1].y>b[j].y)))
				{
					
					mid=b[j-1];
					b[j-1]=b[j];
					b[j]=mid;
				}
			}
		}
	
			for(i=0;i<num;i++){

		printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",a[b[i].x][0],a[b[i].x][1],a[b[i].x][2],a[b[i].y][0],a[b[i].y][1],a[b[i].y][2],b[i].d);

			}
}
return 0;
}