semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main(){
	int n,i,j,k,LEN;
	int a[30];
	double b[135],e;

	scanf("%d",&n);

	for(i=0;i<=3*n-1;i++){
		scanf("%d",&a[i]);
	}
	k=0;
	for(i=0;i<=3*n-4;i=i+3){
		for(j=i+3;j<=3*n-1;j=j+3){
			b[k]=sqrt((a[i]-a[j])*(a[i]-a[j])+(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[k+1]=i;
			b[k+2]=j;
			k+=3;
		}
	}
	LEN=n*(n-1)/2;
	for(k = 1;k<=LEN;k++){
		for(i =0;i<LEN-k; i++){
			if(b[3*i]<b[3*i+3]){
					e=b[3*i+3];
					b[3*i+3]=b[3*i];
					b[3*i]=e;
					e=b[3*i+4];
					b[3*i+4]=b[3*i+1];
					b[3*i+1]=e;
					e=b[3*i+5];
					b[3*i+5]=b[3*i+2];
					b[3*i+2]=e;

			}
		}
	}
    for(i=0;i<=3*n*(n-1)/2-1;i=i+3){
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",a[(int)b[i+1]],a[(int)b[i+1]+1],a[(int)b[i+1]+2],a[(int)b[i+2]],a[(int)b[i+2]+1],a[(int)b[i+2]+2],b[i]);
	}

	return 0;
}
struct dian{
float x;
float y;
float z;
};
struct diandui{
struct dian a;
struct dian b;
float dis;
};
void main(){
   int n,i,j,t=0;
   struct dian d[10];
   struct diandui dui[50],temp;
   scanf("%d",&n);
   for(i=0;i<n;i++){
   scanf("%f%f%f",&d[i].x,&d[i].y,&d[i].z);
   }
   for(i=0;i<n;i++){
        for(j=i+1;j<n;j++){
            dui[t].a=d[i];
            dui[t].b=d[j];
            //printf("%f %f",d[i].x,d[j].x);
            dui[t].dis=sqrt((d[i].x-d[j].x)*(d[i].x-d[j].x)+(d[i].y-d[j].y)*(d[i].y-d[j].y)+(d[i].z-d[j].z)*(d[i].z-d[j].z));
            //printf("%.2f\n",dui[t].dis);
            t++;
        }
   }
   for(i=0;i<t;i++){
        for(j=0;j<t-1-i;j++){
            if(dui[j].dis<dui[j+1].dis){
                temp=dui[j];
                dui[j]=dui[j+1];
                dui[j+1]=temp;
            }
        }
   }
   for(i=0;i<t;i++){
        printf("(%.0f,%.0f,%.0f)-(%.0f,%.0f,%.0f)=%.2f\n",dui[i].a.x,dui[i].a.y,dui[i].a.z,dui[i].b.x,dui[i].b.y,dui[i].b.z,dui[i].dis);
   }
}
struct DIS
{
	int fir;
	int sec;
	double d;
};






int main()
{

   struct DIS dis[50];
   const double eps=1e-6;

   int x[11];
   int y[11];
   int z[11];
   int n,i,j,k=1;
   struct DIS temp;
   cin>>n;
   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[k].fir=i;
		   dis[k].sec=j;
		   dis[k++].d=sqrt((double)(x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j])+(z[i]-z[j])*(z[i]-z[j]));
	   }
   }
   for(i=1;i<=n*(n-1)/2;i++)
   {
	   for(j=n*(n-1)/2;j>=i+1;j--)
	   {
		   if(dis[j].d>dis[j-1].d+eps)
		   {
			   temp.d=dis[j].d;
			  temp.fir=dis[j].fir;
			  temp.sec=dis[j].sec;
			   dis[j].d=dis[j-1].d;
			   dis[j].fir=dis[j-1].fir;
			   dis[j].sec=dis[j-1].sec;
			   
			   dis[j-1].d=temp.d;
			    dis[j-1].fir=temp.fir; 
				dis[j-1].sec=temp.sec;
		   }
	   }
   }
   for(i=1;i<=n*(n-1)/2;i++)
   {
	   cout<<"("<<x[dis[i].fir]<<","<<y[dis[i].fir]<<","<<z[dis[i].fir]<<")-("<<x[dis[i].sec]<<","<<y[dis[i].sec]<<","<<z[dis[i].sec]<<")="<<fixed<<setprecision(2)<<dis[i].d<<endl;
   }
	   

	

 
 return 0;

}
int main()
{
	int n,i,j,x1=0,x2=0,q=0,w1,w2,w3,w4,w5,w6,t,k,m=1,p=1,l=0,g;
	scanf("%d",&n);
	int a[10][3],c[1000],d[1000],e[1000],c1[1000],d1[1000],e1[1000],c2[1000]={0};
	float b[1000]={0};
	float x,y;
	for(int i1=0;i1<=n-1;i1++)
	{
		scanf("%d %d %d",&a[i1][0],&a[i1][1],&a[i1][2]);
	}
	for(x1=0;x1<=n-2;x1++)
	{
		for(x2=x1+1;x2<=n-1;x2++)
		{
		      b[q]=sqrt((float)((a[x2][0]-a[x1][0])*(a[x2][0]-a[x1][0])+(a[x2][1]-a[x1][1])*(a[x2][1]-a[x1][1])+(a[x2][2]-a[x1][2])*(a[x2][2]-a[x1][2])));
			  c[q]=a[x1][0];   d[q]=a[x1][1];  e[q]=a[x1][2];  c1[q]=a[x2][0];  d1[q]=a[x2][1];  e1[q]=a[x2][2];
			 
			  q++;
		}
	}
	for(i=q-1;i>=1;i--)
	{
		for(j=i-1;j>=0;j--)
		{
			if(b[i]>=b[j])
			{
				x=b[i];
				b[i]=b[j];
				b[j]=x;
				w1=c[i]; w2=d[i]; w3=e[i]; w4=c1[i]; w5=d1[i]; w6=e1[i];
				c[i]=c[j]; d[i]=d[j]; e[i]=e[j]; c1[i]=c1[j]; d1[i]=d1[j]; e1[i]=e1[j];
				c[j]=w1; d[j]=w2; e[j]=w3; c1[j]=w4; d1[j]=w5; e1[j]=w6;
				
			}
		}
	}
	for(int h=0;h<=q-1;h++)
	{
		if(b[h]!=b[h+1]) {c2[p]=h; p++;}
	} 
	for(int h1=999;h1>=0;h1--)
	{
		if(c2[h1]>0) {g=h1;break;}
	}
	if(g<1) {g=1;}
	c2[0]=-1;
	for(int x4=0;x4<=g-1;x4++)
	{
		for(int x5=c2[x4]+1;x5<=c2[x4+1];x5++)
		{
			k=c2[x4]+1+c2[x4+1]-x5;
			printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",c[k],d[k],e[k],c1[k],d1[k],e1[k],b[k]);
		}
	}


	return 0;
}
int main(){
    int n,i,j,k,m,q;
    j=0;
    scanf("%d",&n);
    int a[10],b[10],c[10],f[50],g[50],h[50],l[50],o[50],p[50];
    double d[50];
    double e;
    for(i=0;i<n;i++){
           scanf("%d %d %d",&a[i],&b[i],&c[i]);
    }
    for(i=0;i<n;i++){
           for(m=i+1;m<n;m++){
                    e=(a[i]-a[m])*(a[i]-a[m])+
                      (b[i]-b[m])*(b[i]-b[m])+
                      (c[i]-c [m])*(c[i]-c[m]);
                      d[j]=sqrt(e);
                      f[j]=a[i];
                      g[j]=b[i];
                      h[j]=c[i];
                      l[j]=a[m];
                      o[j]=b[m];
                      p[j]=c[m];
                      j=j+1;
           }       
    }         
    for(k = 1 ; k <= j ; k++){
         for(i = 0; i < j- k; i++){
			if(d[i] < d[i+1]){
			     e = d[i+1];
			     d[i+1] = d[i];
			     d[i] = e;
                   	     q= f[i+1];
			     f[i+1] = f[i];
			     f[i] = q;
                 	              q= g[i+1];
			     g[i+1] = g[i];
			     g[i] = q;
                                q= h[i+1];
			     h[i+1] = h[i];
			     h[i] = q;
                                q= l[i+1];
			     l[i+1] = l[i];
			     l[i] = q;
                	              q= o[i+1];
			     o[i+1] = o[i];
		              o[i] = q;
                   	     q= p[i+1];
			     p[i+1] =p[i];
			     p[i] = q;
			}
	}
    }
    for(i=0;i<j;i++){
                printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",f[i],g[i],h[i],l[i],	               o[i],p[i],d[i]); 
    }
	return 0;
}
//********************************************************
//*  ???:1.cpp                                        *
//*  ??????    1200012948                          *
//*  ????: 2012 12 09                                *
//*  ????:????                                   *
//********************************************************
struct shuju  //????????????????
{
	int xx;
	int yy;
	double dis;
} sj[100], temp;
struct distance  //????????
{
	int x;
	int y;
	int z;
}point[10];
int main()
{
	int n, i, j, k = 0;
	cin >> n;
	for (i = 1; i <= n; i++)
	{
		cin >> point[i].x >> point[i].y >> point[i].z;
	}
	for (i = 1; i < n; i++)
		for(j = i + 1; j <= n; j++)
		{
			k++;
			double m = (point[i].x - point[j].x) * (point[i].x - point[j].x)
					+ (point[i].y - point[j].y) * (point[i].y - point[j].y)
					+ (point[i].z - point[j].z) * (point[i].z - point[j].z);
			sj[k].dis = sqrt(m);
			sj[k].xx = i;
			sj[k].yy = j;
		}
	for (i = 1; i < n * (n - 1) / 2; i++)   //??
		for (j = 1; j <= n * (n - 1) / 2 - i; j++)
		{
			if (sj[j].dis < sj[j + 1].dis)
			{
				temp =sj[j];
				sj[j] = sj[j + 1];
				sj[j + 1] = temp;
			}
		}
	for (i = 1; i <= n * (n - 1) / 2; i++)
	{
		cout << "(" << point[sj[i].xx].x << "," << point[sj[i].xx].y << "," << point[sj[i].xx].z << ")"
			<< "-" << "(" << point[sj[i].yy].x << "," << point[sj[i].yy].y << "," << point[sj[i].yy].z << ")"
			<< "=" << fixed << setprecision(2) << sj[i].dis << endl;
	}
	return 0;

}
int main ()
{
    int n,a[4][10],p;                //?? 
    float dis[100][3];
    float fuzhu;
    cin >>n;                //?? 
    for (int i=0;i<n;i++)
    {
        for (int j=1;j<=3;j++)
        {
            cin >>a[j][i];
        }
    }
    p=0;
    for (int i=0;i<n;i++)              //?? 
    {
        for (int j=i+1;j<n;j++)
        {
            p++;
            dis[p][0]=sqrt((float)((a[1][i]-a[1][j])*(a[1][i]-a[1][j])+(a[2][i]-a[2][j])*(a[2][i]-a[2][j])+(a[3][i]-a[3][j])*(a[3][i]-a[3][j])));
            dis[p][1]=i;
            dis[p][2]=j;
        }
    }
    for (int i=1;i<=1000;i++)          //?? 
    {
        for (int j=1;j<=p-1;j++)
        {
            if (dis[j][0]<dis[j+1][0])
            {
               fuzhu=dis[j][0];dis[j][0]=dis[j+1][0];dis[j+1][0]=fuzhu;
               fuzhu=dis[j][1];dis[j][1]=dis[j+1][1];dis[j+1][1]=fuzhu;
               fuzhu=dis[j][2];dis[j][2]=dis[j+1][2];dis[j+1][2]=fuzhu;
            }
        }
    }
    for (int i=1;i<=p;i++)               //?? 
    {
        cout <<"("<<a[1][(int)dis[i][1]]<<","<<a[2][(int)dis[i][1]]<<","<<a[3][(int)dis[i][1]]<<")-("<<a[1][(int)dis[i][2]]<<","<<a[2][(int)dis[i][2]]<<","<<a[3][(int)dis[i][2]]<<")=";
        cout <<fixed<<setprecision(2)<<dis[i][0];
        cout <<endl;
    }
    return 0;
}
int main()
{
    int n, i, j, k, m = 0;
    double taoyan[100];
    struct ss
    {
        int x;
        int y;
        int z;
        double jl[10];
    }zz[10];
    cin >> n;
    for(int i = 0; i < n; ++i)
    cin >> zz[i].x >> zz[i].y >> zz[i].z;
    for(i = 0; i < n - 1; i++)
        for(j = i + 1; j < n; j++)
        {
            int a = (zz[i].x - zz[j].x) * (zz[i].x - zz[j].x) + (zz[i].y - zz[j].y)
                    * (zz[i].y - zz[j].y) + (zz[i].z - zz[j].z) * (zz[i].z - zz[j].z);
            zz[i].jl[j] = sqrt(a);
            taoyan[m ++] = zz[i].jl[j];
        }
    sort(taoyan, taoyan + m);
    for(k = m ; k >= 0; k--)
    {
        for(i = 0; i < n - 1; ++i)
            for(j = i + 1; j < n; ++j)
            {
                if(zz[i].jl[j] == taoyan[k])
                {
                    cout << "(" << zz[i].x << "," << zz[i].y << "," << zz[i].z << ")-(" <<
                    zz[j].x << "," << zz[j].y << "," << zz[j].z << ")=" << fixed << setprecision(2)
                    << zz[i].jl[j] << endl;
                    zz[i].jl[j] = 0;
                }

            }

    }


    return 0;
}
void main()
{
	int m,n,i,j,k,a,c,t,u;
	int tt[100][3];
	int pp[10000][6];
	float xx[10000],b;
	scanf("%d",&m);
	for(i=0;i<m;i++)
	{
		for(u=0;u<3;u++)
		{
			scanf("%d",&tt[i][u]);
		}
	}
	n=m*(m-1)/2;
	t=n;
	for(a=0,j=0;j<m-1;j++)
	{
		for(k=j+1;k<m;k++,a++)
		{
              xx[a]=sqrt((tt[j][0]-tt[k][0])*(tt[j][0]-tt[k][0])+(tt[j][1]-tt[k][1])*(tt[j][1]-tt[k][1])+(tt[j][2]-tt[k][2])*(tt[j][2]-tt[k][2]));
			  pp[a][0]=tt[j][0];
			  pp[a][1]=tt[j][1];
			  pp[a][2]=tt[j][2];
			  pp[a][3]=tt[k][0];
			  pp[a][4]=tt[k][1];
			  pp[a][5]=tt[k][2];
		}
	}
	for(i=0;i<n-1;n--)
	{
		for(j=i;j<n-1;j++)
		{
			if(xx[j]<xx[j+1]) 
			{
				b=xx[j]; xx[j]=xx[j+1]; xx[j+1]=b;
                c=pp[j][0]; pp[j][0]=pp[j+1][0]; pp[j+1][0]=c;
				c=pp[j][1]; pp[j][1]=pp[j+1][1]; pp[j+1][1]=c;
				c=pp[j][2]; pp[j][2]=pp[j+1][2]; pp[j+1][2]=c;
				c=pp[j][3]; pp[j][3]=pp[j+1][3]; pp[j+1][3]=c;
				c=pp[j][4]; pp[j][4]=pp[j+1][4]; pp[j+1][4]=c;
				c=pp[j][5]; pp[j][5]=pp[j+1][5]; pp[j+1][5]=c;
			}
		}
	}
	for(k=0;k<t;k++)
	{
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",pp[k][0],pp[k][1],pp[k][2],pp[k][3],pp[k][4],pp[k][5],xx[k]);
	}
	



}
typedef struct
{
	int x;
	int y;
	int z;
} point3D; //?????????

typedef struct
{
	int firstPointIndex; //???????
	int lastPointIndex; //???????
	float distance;//?????
} result; //???? ??????

float getDistance(point3D p1, point3D p2)
{
	int temp;
	temp = (p1.x - p2.x) * (p1.x - p2.x) +
		   (p1.y - p2.y) * (p1.y - p2.y) +
		   (p1.z - p2.z) * (p1.z - p2.z);
	return sqrtf((float)temp);
}


int main()
{
	point3D points[MAXPOINTS]; //????? ???????
	result results[MAXRESULTS];//??????????????

	int i, j, k, pointNum, resultNum;

	result temp;

	//?????
	scanf("%d", &pointNum);

	resultNum = pointNum * (pointNum - 1) / 2;
	//?????
	for (i = 0; i <  pointNum; i++)
	{
		scanf("%d", &points[i].x);
		scanf("%d", &points[i].y);
		scanf("%d", &points[i].z);
	}
		
	//??????
	k = 0;
	for (i = 0; i < pointNum; i++)
	{
		for (j = i + 1; j < pointNum; j++)
		{
			results[k].firstPointIndex = i;
			results[k].lastPointIndex = j;
			results[k].distance = getDistance(points[i], points[j]);
			k++;
		}
	}
	

	//?????????? ??????
	for (i = 0; i < resultNum - 1; i++)
		for (j = 0; j < resultNum - i - 1; j++)
		{
			if (results[j].distance < results[j + 1].distance )
			{
				temp = results[j];
				results[j] = results[j + 1];
				results[j + 1] = temp;
			}
		}

	//????
	for (i = 0; i < resultNum; i++)
	{
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",
			   points[results[i].firstPointIndex].x,
			   points[results[i].firstPointIndex].y,
			   points[results[i].firstPointIndex].z,
			   points[results[i].lastPointIndex].x,
			   points[results[i].lastPointIndex].y,
			   points[results[i].lastPointIndex].z,
			   results[i].distance);
	}

	return 0;
}
int  zuob[12][3];   //???
 
int vis[12][12];
int main()
{
   // freopen("1.in","r",stdin);
   // freopen("1.out","w",stdout);
    double distance[12][12];
    memset(vis,sizeof(vis),0);
    int n;int ii,jj;
    cin >> n;
    for(int i=0;i<n;i++)
    cin >> zuob[i][0] >> zuob[i][1] >> zuob[i][2];
    for(int i=0;i<n-1;i++)
      for(int j=i+1;j<n;j++)
        distance[i][j]=sqrt((zuob[i][0]-zuob[j][0])*(zuob[i][0]-zuob[j][0])+(zuob[i][1]-zuob[j][1])*(zuob[i][1]-zuob[j][1])+(zuob[i][2]-zuob[j][2])*(zuob[i][2]-zuob[j][2]));
     
     for(int z=0;z<(n*(n-1)/2);z++)
     {double max=-1;
     for(int i=0;i<n-1;i++)
      for(int j=i+1;j<n;j++)
       if(vis[i][j]==0 && distance[i][j]>max)
        {max=distance[i][j];ii=i;jj=j;}
     cout<<"("<<zuob[ii][0]<<","<<zuob[ii][1]<<","<<zuob[ii][2]<<")"
          <<"-"<<"("<<zuob[jj][0]<<","<<zuob[jj][1]<<","<<zuob[jj][2]<<")"
          <<"=";
	 printf("%.2lf\n",max);
      vis[ii][jj]=1;
      }  
      return 0;
}
int main()
{
	int n , c ;
	cin >> n ;     //???
	int x[n] , y[n] , z[n] ;
	c = n * ( n - 1 ) / 2 ;    //????
	int a[c] , b[c] ;        // ????????????????????
	double l[c] ;            //????
	for( int i = 0 ; i < n ; i ++ )      //??
	{
		cin >> x[i] >> y[i] >> z[i] ;
	}
	c = -1 ;
	for( int i = 0 ; i < n - 1 ; i ++ )     //???????
		for( int j = i + 1 ; j < n ; j ++ )
		{
			c ++ ;
			a[c] = i ;
			b[c] = j ;
			l[c] = 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] ) ) ;
		}
	double t1 = 0 ;
	int t = 0 ;
	for( int i = 0 ; i <= c ; i ++  )          //??????????????
		for( int j = 0 ; j <= c - 1 - i ; j ++ )
		{
			if( l[j] < l[j+1] )
			{
              t1 = l[j] ; l[j] = l[j+1] ; l[j+1] = t1 ;
              t = a[j] ; a[j] = a[j+1] ; a[j+1] = t ;
              t = b[j] ; b[j] = b[j+1] ; b[j+1] = t ;
			}
		}
	cout << fixed << setprecision(2) ;    //????????
	for( int i = 0 ; i <= c ; i ++ )
	{
		cout << "(" << x[a[i]] << "," << y[a[i]] << "," << z[a[i]] << ")-("
				<< x[b[i]] << "," << y[b[i]] << "," << z[b[i]] << ")="
				<< l[i] << endl ;
	}



	return 0 ;
}
//============================================================================
// Name        : 3.cpp
// Author      : 
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================


int main() {
	int n;
	cin>>n;
	int x[n],y[n],z[n];                         //x[n],y[n],z[n]?????????
	int f=n*(n-1)/2;                            //f??????
	for(int i=0;i<n;i++)
		cin>>x[i]>>y[i]>>z[i];
	int a1[f],b1[f],c1[f],a2[f],b2[f],c2[f];
	float e[f];
	int d=0;
	int num[f];
	for(int i=0;i<n;i++)
		for(int j=i+1;j<n;j++)
		{
			a1[d]=x[i];                          //????????
			b1[d]=y[i];
			c1[d]=z[i];
			a2[d]=x[j];
			b2[d]=y[j];
			c2[d]=z[j];
			e[d]=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]));
			num[d]=d;
			d++;                                 //e[f]???????
		}
	int m=0;                                     //m,n1????????????
	float n1=0;
	for(int i=0;i<f;i++)
		for(int j=i+1;j<f;j++)
		{
			if(e[i]<e[j])
			{
				n1=e[i];e[i]=e[j];e[j]=n1;
				m=a1[i];a1[i]=a1[j];a1[j]=m;
				m=b1[i];b1[i]=b1[j];b1[j]=m;
				m=c1[i];c1[i]=c1[j];c1[j]=m;
				m=a2[i];a2[i]=a2[j];a2[j]=m;
				m=b2[i];b2[i]=b2[j];b2[j]=m;
				m=c2[i];c2[i]=c2[j];c2[j]=m;
				m=num[i];num[i]=num[j];num[j]=m;
			}
			if((e[i]==e[j])&&(num[i]>num[j]))    //????????????
		    {
				n1=e[i];e[i]=e[j];e[j]=n1;
			    m=a1[i];a1[i]=a1[j];a1[j]=m;
				m=b1[i];b1[i]=b1[j];b1[j]=m;
				m=c1[i];c1[i]=c1[j];c1[j]=m;
				m=a2[i];a2[i]=a2[j];a2[j]=m;
				m=b2[i];b2[i]=b2[j];b2[j]=m;
				m=c2[i];c2[i]=c2[j];c2[j]=m;
				m=num[i];num[i]=num[j];num[j]=m;
		    }
		}
	for(int i=0;i<f;i++)
		cout<<"("<<a1[i]<<","<<b1[i]<<","<<c1[i]<<")-("<<a2[i]<<","<<b2[i]<<","<<c2[i]<<")="<<fixed<<setprecision(2)<<e[i]<<endl;
	return 0;
}
/* ????????.cpp
 * ???1200012826 ??
 * ??? 2012?12?14?
 */
struct  point
{
	int x, y, z;
} p[10];
struct distance
{
	int a,b;
	double dis;
} d[45], tr;
int main()
{
	int n, i, j, k=0; 
	cin >> n;
	for(i=0; i<n; i++)
	{
		cin >> p[i].x >> p[i].y >> p[i].z;
	}
	for(i=0; i<n-1; i++)
		for(j=i+1; j<n; j++)
		{
			d[k].dis=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));
			d[k].a=i;
			d[k].b=j;
			k++;
		}
	for(i=0; i<k-1; i++)
		for(j=0; j<k-i-1; j++)
		{
			if(d[j].dis < d[j+1].dis)
			{
				tr=d[j]; d[j]=d[j+1]; d[j+1]=tr;
			}
		}
	for(i=0; i<k; i++)
	{
		cout << "(" << p[d[i].a].x << "," << p[d[i].a].y << "," << p[d[i].a].z << ")-(" << p[d[i].b].x << "," << p[d[i].b].y <<  "," << p[d[i].b].z << ")=";
		cout << fixed << setprecision(2) << d[i].dis << endl;
	}
	return 0;
}
struct point
{
    int x;
    int y;
    int z;
} p[100];

struct line
{
    int p1;
    int p2;
    double len;
} l[1000], t;

int main()
{
    int n, i, j, d[1000], c = 0;
    double temp;
    cin >> n;
    for (i = 0; i < n; i++)
    {
        cin >> p[i].x >> p[i].y >> p[i].z;
    }
    for (i = 0; i < n; i++)
    {
        for (j = i + 1; j < n; j++)
        {
            l[c].len = 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));
            l[c].p1 = i;
            l[c].p2 = j;
            c++;
        }
    }
    for (i = 0; i < n * (n - 1) / 2; i++)
    {
        for (j = 0; j < n * (n - 1) / 2 - i; j++)
        {
            if (l[j].len < l[j + 1].len )
            {
                t = l[j];
                l[j] = l[j + 1];
                l[j + 1] = t;
            }
        }
    }
    for (i = 0; i < n * (n - 1) / 2; i++)
    {
        cout << "(" << p[l[i].p1].x << "," << p[l[i].p1].y << "," << p[l[i].p1].z << ")-(" << p[l[i].p2].x << "," << p[l[i].p2].y << "," << p[l[i].p2].z << ")=" << fixed << setprecision(2) << l[i].len << setprecision(0) << endl;
    }
    return 0;
}
int main()
{	
	int n,i,j,k=0,x[10],y[10],z[10],a[90],b[90];//n:??,i,j,k=0,?????x[10],y[10],z[10]????x?y?z??,a[90],b[90]?????????
	double l[90],p;//l[90]:???p:?????????
	cin>>n;
	for(i=0;i<n;i++)
		cin>>x[i]>>y[i]>>z[i];
	for(i=0;i<n-1;i++)
		for(j=i+1;j<n;j++)
		{
			l[k]=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[k]=i;
			b[k]=j;
			k++;
		}

	for(i=1;i<k;i++)
		for(j=0;j<k-i;j++)
		{
			if(l[j]<l[j+1])
			{
				p=l[j];
				l[j]=l[j+1];
				l[j+1]=p;
				p=a[j];
				a[j]=a[j+1];
				a[j+1]=p;
				p=b[j];
				b[j]=b[j+1];
				b[j+1]=p;
			}	
		}
	for(i=0;i<k;i++)
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",x[a[i]],y[a[i]],z[a[i]],x[b[i]],y[b[i]],z[b[i]],l[i]);
	return 0;
}
struct point{
    int x;
    int y;
    int z;
};

struct distanceBetweenPoints{
    int pointIndex1;
    int pointIndex2;
    double distace;
};

double distance(struct point p1, struct point p2){
    double d =0.0;
    d = sqrt((p1.x - p2.x)*(p1.x - p2.x) + (p1.y - p2.y)*(p1.y - p2.y) + (p1.z - p2.z)*(p1.z - p2.z));
    return d;
}

int main(int argc, const char * argv[])
{
    int n;
    scanf("%d", &n);
    
    struct point points[n];
    for (int j=0; j<n; j++) {
        scanf("%d %d %d", &points[j].x, &points[j].y, &points[j].z);
    }
    
    struct distanceBetweenPoints distances[n*(n-1)/2];
    int index = 0;
    for (int index1=0; index1<n; index1++) { 
        for (int index2=index1+1; index2<n; index2++) {
            double d = distance(points[index1], points[index2]);
            distances[index].distace = d;
            distances[index].pointIndex1 = index1;
            distances[index].pointIndex2 = index2;
            index ++;
        }
    }
    
    for (int i=0; i<index; i++) {
        for (int j=1; j<index-i; j++) {
            if (distances[j-1].distace < distances[j].distace) {
                struct distanceBetweenPoints temp;
                temp = distances[j-1];
                distances[j-1] = distances[j];
                distances[j] = temp;
            }
        }
    }
    
    for (int i = 0; i < index; i++) {
        printf("(%d,%d,%d)",points[distances[i].pointIndex1].x, points[distances[i].pointIndex1].y, points[distances[i].pointIndex1].z);
        printf("-");
        printf("(%d,%d,%d)",points[distances[i].pointIndex2].x, points[distances[i].pointIndex2].y, points[distances[i].pointIndex2].z);
        printf("=");
        printf("%.2lf\n", distances[i].distace);
    }
    
    return 0;
}
struct point
{
	int x[2];
	int y[2];
	int z[2];
	float s;
}p[100],q;
float distant (int x1,int y1, int z1,int x2,int y2,int z2)
{
	float m,e;
	e=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)+(z1-z2)*(z1-z2);
	m=sqrt(e);
	return (m);
}

int main ()
{
	int n,x[11]={0},y[11]={0},z[11]={0},i,j=0,s[100]={0},k,t=1;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d %d %d",&x[i],&y[i],&z[i]);
	}
	for(i=0;i<n*(n-1)/2;i++)
	{
		p[i].x[0]=x[j];
		p[i].y[0]=y[j];
		p[i].z[0]=z[j];
		p[i].x[1]=x[j+t];
		p[i].y[1]=y[j+t];
		p[i].z[1]=z[j+t];
		t++;
		if(j+t>n-1)
		{
			j++;
			t=1;
		}
	}
	for(i=0;i<n*(n-1)/2;i++)
	{
			p[i].s=distant(p[i].x[0],p[i].y[0],p[i].z[0],p[i].x[1],p[i].y[1],p[i].z[1]);
	}
	for(k=1;k<=n*(n-1)/2;k++)
	{
	for(i=0;i<n*(n-1)/2;i++)
	{
			if(p[i].s<p[i+1].s)
			{
				q=p[i];
				p[i]=p[i+1];
				p[i+1]=q;
			}
	}
	}
	printf("(%d,%d,%d)-(%d,%d,%d)=%.2f",p[0].x[0],p[0].y[0],p[0].z[0],p[0].x[1],p[0].y[1],p[0].z[1],p[0].s);
	for(i=1;i<n*(n-1)/2;i++)
		printf("\n(%d,%d,%d)-(%d,%d,%d)=%.2f",p[i].x[0],p[i].y[0],p[i].z[0],p[i].x[1],p[i].y[1],p[i].z[1],p[i].s);
	return 0;
}
int main (){
	int n;
	cin>>n;
	int x[10],y[10],z[10];
	int i,j;
	for(i=0;i<=n-1;i++)
		cin>>x[i]>>y[i]>>z[i];//??i???????
	float d[45];//??
	int s[45],e[45];//????????
	int t=0;//??d???
	for(i=0;i<=n-2;i++)
		for(j=i+1;j<=n-1;j++)//???????????????????????????????????????????????????????????
		{
			d[t]=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]));
			s[t]=i,e[t]=j;
			t++;
		}
	float tempd;
	int temp;
	for(i=0;i<=t-2;i++)
		for(j=t-1;j>=i+1;j--)
			if(d[j]>d[j-1])
			{
				tempd=d[j],d[j]=d[j-1],d[j-1]=tempd;
				temp=s[j],s[j]=s[j-1],s[j-1]=temp;
				temp=e[j],e[j]=e[j-1],e[j-1]=temp;
			}
	cout<<fixed<<setprecision(2);//??????
	for(i=0;i<=t-1;i++)
		cout<<"("<<x[s[i]]<<","<<y[s[i]]<<","<<z[s[i]]<<")-("<<x[e[i]]<<","<<y[e[i]]<<","<<z[e[i]]<<")="<<d[i]<<endl;
}