semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
    int n;           //??n
    cin>>n;          //??n
    float a[100],b[100],c[100],s[100],t;       //??????a,b,c,???????????t
    int i,l,m,p=0,j,k,q,x,d[100],e[100];       //???????????d,e
    for(i=0;i<n;i++)
    {
        cin>>a[i]>>b[i]>>c[i];               //????
    }
    for(l=0;l<n-1;l++)
    {
         for(m=l+1;m<n;m++)
         {
             s[p]=sqrt((a[l]-a[m])*(a[l]-a[m])+(b[l]-b[m])*(b[l]-b[m])+(c[l]-c[m])*(c[l]-c[m]));         //????
             d[p]=l;                          //???????????
             e[p]=m;
             p++;
         }
    }
    for(j=0;j<p-1;j++)
    {
        for(k=j+1;k<p;k++)
        {
            if(s[k]>s[j])              //????????
            {
               t=s[k];
               s[k]=s[j];
               s[j]=t;
               q=d[k];
               d[k]=d[j];             //???????
               d[j]=q;
               q=e[k];
               e[k]=e[j];
               e[j]=q;
            }
            if(s[k]==s[j])
            {
                if(d[j]>d[k]||e[j]>e[k])       //??????????????????
                  {
                      q=d[k];
                      d[k]=d[j];
                      d[j]=q;
                      q=e[k];
                      e[k]=e[j];
                      e[j]=q;
                 }
           }
       }
    }
    for(x=0;x<p;x++)
    {
        cout<<"("<<a[d[x]]<<","<<b[d[x]]<<","<<c[d[x]]<<")-("<<a[e[x]]<<","<<b[e[x]]<<","<<c[e[x]]<<")=";
        printf("%.2f\n",s[x]);                     //??
    }
    return 0;
}
struct location
{
	int x;
	int y;
	int z;
} point[10], t;
struct dis
{
	int point1;
	int point2;
	double s;
	int num;
} len[45], temp;
int main()
{
	int n, i, j,count = 0, p;
	double t;
	cin >> n;
	for (i = 0; i < n; i++)
	{
		cin >> point[i].x >> point[i].y 
			>> point[i].z;
	}
	for (i = 0; i < n - 1; i++)
		for (j = i + 1; j < n; j++)
		{
			len[count].point1 = i;
			len[count].point2 = j;
			t = pow ((double) (point[i].x - point[j].x), 2) +
				pow ((double) (point[i].y - point[j].y), 2) +
				pow ((double) (point[i].z - point[j].z), 2);
			len[count].s = sqrt (t);
			len[count].num = count;
			++count;
		}
	for (i = 0; i < count - 1; i++)
	{
		p = i;
		for (j = i +1; j < count; j++)
		{
			if (len[p].s < len[j].s)			
				p = j;
			else if (len[p].s == len[j].s 
				     && len[p].num > len[j].num)
				p = j;
		}
		{
			temp = len[p];
			len[p] = len[i];
			len[i] = temp;
		}
	}
	for (i = 0; i < count; i++)
	{
		cout << "(" << point[len[i].point1].x 
			 << "," << point[len[i].point1].y
			 << "," << point[len[i].point1].z
			 << ")" << "-"
			 << "(" << point[len[i].point2].x 
			 << "," << point[len[i].point2].y
			 << "," << point[len[i].point2].z
			 << ")" << "=" << fixed << setprecision(2)
			 << len[i].s << endl;
	}
	return 0;
}
struct point
{
	int x[3];
}pt[10];
struct str
{
	struct point po[2];
	float distance;
}dis[50], temp;
void main()
{
	int n, i, j, num;
	scanf("%d",&n);
	for(i=0; i<n; i++)
	{
		for(j=0; j<=2; j++)
			scanf("%d",&pt[i].x[j]);
	}
	//??????
	for(i=0; i<50; i++)
		dis[i].distance=0.0;
	for(i=0, num=0; i<n-1; i++)//????
	{
		for(j=i+1; j<n; j++)
		{
			dis[num].po[0]=pt[i];
			dis[num].po[1]=pt[j];
			dis[num].distance=sqrt( abs(pt[i].x[0]-pt[j].x[0])*abs(pt[i].x[0]-pt[j].x[0])+abs(pt[i].x[1]-pt[j].x[1])*abs(pt[i].x[1]-pt[j].x[1])+abs(pt[i].x[2]-pt[j].x[2])*abs(pt[i].x[2]-pt[j].x[2]) );
			num++;
		}
	}

	for(num=0, i=0; dis[i].distance>0.01; i++)//?num????????
	{
		num++;
	}
	for(j=1; j<num ; j++)	//????
	{
		for(i=0; i<num-j; i++)
		{
			if( (dis[i+1].distance-dis[i].distance)>0.01 )
			{
				temp=dis[i];
				dis[i]=dis[i+1];
				dis[i+1]=temp;
			}
		}
	}
	for(i=0; i<num; i++)
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",dis[i].po[0].x[0],dis[i].po[0].x[1],dis[i].po[0].x[2],dis[i].po[1].x[0],dis[i].po[1].x[1],dis[i].po[1].x[2],dis[i].distance);
}
//********************************
//*????***********************
//*??? 1300012920**************
//********************************
int main()
{
	int n , i , j;
	int x , y , z;
	int cnt = 0;
	//???????"zuobiao"????????
	struct 
	{
		int x;
		int y;
		int z;
	}zuobiao[10];
	struct 
	{
		int x1;
		int y1;
		int z1;
		int x2;
		int y2;
		int z2;
		int num1;
		int num2;
		double len;
	}len[50];
	cin >> n;//??????
	for(i = 0 ; i < n ; i++)//??????
	{
		cin >> x >> y >> z;
		zuobiao[i].x = x;
		zuobiao[i].y = y;
		zuobiao[i].z = z;
	}
	//???????????????????????len?
	for(i = 0 ; i < n - 1 ; i++)
		for(j = i + 1 ; j < n ; j++)
		{
			len[cnt].x1 = zuobiao[i].x;
			len[cnt].y1 = zuobiao[i].y;
			len[cnt].z1 = zuobiao[i].z;
			len[cnt].x2 = zuobiao[j].x;
			len[cnt].y2 = zuobiao[j].y;
			len[cnt].z2 = zuobiao[j].z;
			len[cnt].num1 = i;
			len[cnt].num2 = j;
			len[cnt].len = sqrt((zuobiao[i].x - zuobiao[j].x) * (zuobiao[i].x - zuobiao[j].x) + (zuobiao[i].y - zuobiao[j].y) * (zuobiao[i].y - zuobiao[j].y) + 
			(zuobiao[i].z - zuobiao[j].z) * (zuobiao[i].z - zuobiao[j].z));
			cnt++;
		}
	for(i = 0 ; i < (n - 1) * n / 2 - 1 ; i++)
		for(j = i + 1 ; j < (n - 1) * n / 2 ; j++)
		{
			//????????????len[]????
			if(len[i].len < len[j].len)
			{
				len[50] = len[i];
				len[i] = len[j];
				len[j] = len[50];
			}
			//???????????????
			if(len[i].len == len[j].len && len[i].num1 > len[j].num1)
			{
				len[50] = len[i];
				len[i] = len[j];
				len[j] = len[50];
			}
			//????????????????????????
			if(len[i].len == len[j].len && len[i].num1 == len[j].num1 && len[i].num2 > len[j].num2)
			{
				len[50] = len[i];
				len[i] = len[j];
				len[j] = len[50];
			}

		}
	cout << fixed;
	for(j = 0 ; j < n * (n - 1) / 2 ; j++)
		cout << "(" << len[j].x1 << "," << len[j].y1 << "," << len[j].z1 << ")-(" << len[j].x2 << "," << len[j].y2 << "," << len[j].z2 <<")=" << setprecision(2) << len[j].len << endl;
	return 0;
}
void main()
{int i,j,k=1,n,sa[100][3],b=0;
double s[100]={0},point[10][3],a,c;
 scanf("%d",&n);
 for (i=0;i<n;i++)
 {scanf("%lf%lf%lf", &point[i][0],&point[i][1],&point[i][2]);}
 
 for (i=0;i<n-1;i++)
    {for (j=i+1;j<n;j++,k++)
         {c=(point[i][0]-point[j][0])*(point[i][0]-point[j][0])+(point[i][1]-point[j][1])*(point[i][1]-point[j][1])+(point[i][2]-point[j][2])*(point[i][2]-point[j][2]);
          s[k]=sqrt(c);
          sa[k][1]=i; sa[k][2]=j;
         }
    }
 
  for (i=1;i<k;i++)
     {for (j=k-1;j>1;j--)
	      if (s[j]>s[j-1]+0.000001)
		    {s[j-1]=s[j]+s[j-1];
             s[j]=s[j-1]-s[j];
			 s[j-1]=s[j-1]-s[j];
             b=sa[j][1];
			 sa[j][1]=sa[j-1][1];
			 sa[j-1][1]=b;
			 b=sa[j][2];
			 sa[j][2]=sa[j-1][2];
			 sa[j-1][2]=b;

		    }
      }
 for (i=1;i<k;i++)
     {b=sa[i][1];
	  printf("(%.0lf,%.0lf,%.0lf)-",point[b][0],point[b][1],point[b][2]);
	  b=sa[i][2];
	  printf("(%.0lf,%.0lf,%.0lf)=",point[b][0],point[b][1],point[b][2]);
    printf("%.2lf\n", s[i]);}
 
}
int main()
{
	int x[10],y[10],z[10],i,j,n,m=1,l;
	double d[46],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++)
		{
			d[m]=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]));
			m=m+1;
		}
	for(i=1;i<m;i++)
	{
		for(j=1;j<=m-i;j++)
		{
			if(d[j]<d[j+1])
			{
				p=d[j];
				d[j]=d[j+1];
				d[j+1]=p;
			}
		}
	}
	for(i=m;i>1;i--)
	{
		if(d[i]==d[i-1])
			d[i]=0;
	}

	for (l=1;l<=m;l++)
	{
		if(d[l]!=0)
		{
			for(i=0;i<n-1;i++)
			{
			for(j=i;j<n;j++)
			{
				if(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]))==d[l])
				{
			    cout<<"("<<x[i]<<","<<y[i]<<","<<z[i]<<")-("<<x[j]<<","<<y[j]<<","<<z[j]<<")="<<fixed<<setprecision(2)<<d[l]<<endl;
				}
			}
			}
		}
	}

			return 0;
}
int main()
{
int i,j,n,k=0,w;
int x[10],y[10],z[10];
float d[45],dis[10][10],p=0,q=0,m=0,o=0;
cin>>n;
for(i=0;i<n;i++)
{
cin>>x[i]>>y[i]>>z[i];
}
for(j=0;j<n-1;j++)
{
for(i=j+1;i<n;i++)
{
o=(x[j]-x[i])*(x[j]-x[i]);
p=(y[j]-y[i])*(y[j]-y[i]);
q=(z[j]-z[i])*(z[j]-z[i]);
d[k]=sqrt(o+p+q);
k++;
}
}
for(w=1;w<n*(n-1)/2;w++)
{
for(k=0;k<(n*(n-1))/2-w;k++)
{
if(d[k]>d[k+1])
{
m=d[k+1];
d[k+1]=d[k];
d[k]=m;
}
}
}
for(k=n*(n-1)/2-1;k>=0;k--)
{
if(d[k]!=d[k-1])
{
for(j=0;j<n-1;j++)
{
for(i=j+1;i<n;i++)
{
o=(x[j]-x[i])*(x[j]-x[i]);
p=(y[j]-y[i])*(y[j]-y[i]);
q=(z[j]-z[i])*(z[j]-z[i]);
if(d[k]==sqrt(o+p+q))
{
printf("(%d,%d,%d)-(%d,%d,%d)=%.2f",x[j],y[j],z[j],x[i],y[i],z[i],d[k]);
cout<<endl;
}
}
}}}
return 0;
}
int main(int argc, char *argv[])
{
  int n;
  int a[10][3],z[100][6];
  float d[100],t;
  int i,j,l;
  scanf("%d",&n);
  for(i=0;i<n;i++)
  {
    for(j=0;j<3;j++)
    {
      scanf("%d",&a[i][j]);
    }
  }
  int k=0;
  for(i=0;i<n-1;i++)
  {
    for(j=i+1;j<n;j++)
    {
      t=(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]); 
      d[k]=sqrt(t);
      z[k][0]=a[i][0];z[k][1]=a[i][1];z[k][2]=a[i][2];z[k][3]=a[j][0];z[k][4]=a[j][1];z[k][5]=a[j][2];
      k++;
    }
  }
  for(i=k-1;i>0;i--)
  {
    for(j=0;j<i;j++)
    {
      if(d[j]<d[j+1])
      {
        float e;
        e=d[j];d[j]=d[j+1];d[j+1]=e;
        int s;
        for(l=0;l<6;l++)
        {
          s=z[j][l];z[j][l]=z[j+1][l];z[j+1][l]=s;
        }
      }                                                                                      
    }
  }
  for(i=0;i<k;i++)
  {
    printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",z[i][0],z[i][1],z[i][2],z[i][3],z[i][4],z[i][5],d[i]);
  }
  
  return 0;
}
//????
int main()
{
	double a[11],b[11],c[11];
	int n,i,j,k,p,q;
	double max,dis[10][11];
	cin>>n;
	for (i=1;i<=n;i++)//??
	{
		cin>>a[i]>>b[i]>>c[i];
	}
	for (i=1;i<n;i++)//??
	{
		for (j=i+1;j<=n;j++)
		{
			dis[i][j]=(double)pow((double)pow(a[i]-a[j],2)+(double)pow(b[i]-b[j],2)+(double)pow(c[i]-c[j],2),0.5);
			if (dis[i][j]<0)
			{
				dis[i][j]=-dis[i][j];
			}
		}
	}
	for (k=1;k<=n*(n-1)/2;k++)//?????????
	{
		max=dis[1][2];
		p=1;
		q=2;
		for (i=1;i<n;i++)
		{
			for (j=i+1;j<=n;j++)
			{
				if (dis[i][j]>max)
				{
					max=dis[i][j];
					p=i;
					q=j;
				}
			}
		}
		cout<<'('<<(int)a[p]<<','<<(int)b[p]<<','<<(int)c[p]<<')'<<'-'<<'('<<(int)a[q]<<','<<(int)b[q]<<','<<(int)c[q]<<')'<<'='<<fixed<<setprecision(2)<<dis[p][q]<<endl;
		dis[p][q]=0;
	}
	return 0;
}
int n[100][3];
int main()
{
	int m,i,j,t,y[100][2]={0},l=0;
	double k[30][30]={0},max=0,x[30][30]={0};
	cin>>m;
	for(i=0;i<m;i++)
	{
		for(j=0;j<3;j++)
			cin>>n[i][j];
	}
	for(i=0;i<m;i++)
	{
		for(j=m-1;j>i;j--)
		{
			for(t=0;t<3;t++)
			{
				k[i][j]+=(n[i][t]-n[j][t])*(n[i][t]-n[j][t]);
			}
			k[i][j]=sqrt(k[i][j]);
			x[i][j]=k[i][j];
		}
	}
	for(t=1;t<m;t++)
	{
		l=l+t;
	}
	for(t=0;t<l;t++)
	{
		max=0;
		for(i=0;i<m;i++)
		{
			for(j=i+1;j<m;j++)
			{
				if(x[i][j]>max)
				{
					max=x[i][j];
					y[t][0]=i;
					y[t][1]=j;
				}
			}
		}
		x[y[t][0]][y[t][1]]=0;
	}
	for(t=0;t<l;t++)
	{
		cout<<'('<<n[y[t][0]][0]<<','<<n[y[t][0]][1]<<','<<n[y[t][0]][2]<<')'<<'-'<<'('<<n[y[t][1]][0]<<','<<n[y[t][1]][1]<<','<<n[y[t][1]][2]<<')'<<'='<<fixed<<setprecision(2)<<k[y[t][0]][y[t][1]]<<endl;
	}
	char dd;
	cin>>dd;
	return 0;
}
/*
 *???? distanceorder.cpp
 *??????
 *????: 2012-11-10
 *???????????????
 */
int main() {
	int n, i, j, l, k = 0, b;//i,j,l?????
	cin >> n;
	int x[10] = { 0 }, y[10] = { 0 }, z[10] = { 0 }; // ??n?????
	int piont[6][100];// ?????????
	float a;//a?????
	float dis[100] = { 0 };
	for (i = 0; i < n; i++)
		cin >> x[i] >> y[i] >> z[i]; // ????
	for (i = 0; i <= n - 2; i++)
		for (j = i + 1; j <= n - 1; j++) {
			dis[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])); // ?????????
			piont[0][k] = x[i];
			piont[1][k] = y[i];
			piont[2][k] = z[i];
			piont[3][k] = x[j];
			piont[4][k] = y[j];
			piont[5][k] = z[j]; // ???????????????
			k = k + 1;
		}//?????k???
	for (i = 0; i < k - 1; i++)
		for (j = 0; j < k - 1 - i; j++)
			if (dis[j] < dis[j + 1]) {
				a = dis[j];
				dis[j] = dis[j + 1];
				dis[j + 1] = a;
				for (l = 0; l <= 5; l++)
					{b = piont[l][j];
				piont[l][j] = piont[l][j + 1];
				piont[l][j + 1] = b;}
			} // ?????????????
	for (i = 0; i < k ; i++)
		cout << fixed << setprecision(0) << "(" << piont[0][i] << ","
				<< piont[1][i] << "," << piont[2][i] << ")-(" << piont[3][i]
				<< "," << piont[4][i] << "," << piont[5][i] << ")=" << fixed
				<< setprecision(2) << dis[i] << endl; // ????????
	return 0;
}
int main(){
    int n,i,j,x,e,k;
    int sz[10][3]={0};
    double l[45][3];
	double t;
	int d;

	scanf("%d",&n);
	for(i=0;i<n;i++){
		for(j=0;j<3;j++){
			scanf("%d",&(sz[i][j]));
		}
	}
	for(x=0,i=0;i<n-1;i++){
		for(e=i+1;e<n;e++,x++){
		l[x][0]=sqrt(pow(sz[i][0]*1.0-sz[e][0]*1.0,2)+
			         pow(sz[i][1]*1.0-sz[e][1]*1.0,2)+
				     pow(sz[i][2]*1.0-sz[e][2]*1.0,2));//????
		l[x][1]=i;//????????
		l[x][2]=e;
		}
	}

   for( k = 1 ; k <= (n-1)*n/2 ; k++){
	  for( i = 0; i < (n-1)*n/2 - k; i++){
		 if(l[i][0] < l[i+1][0]){
					t = l[i+1][0];                 //exchange lenth
					l[i+1][0] = l[i][0];
					l[i][0] = t;

					d= l[i+1][1];                 //exchange point 1
					l[i+1][1] = l[i][1];
					l[i][1] = d;

					d = l[i+1][2];                 //exchange point 2
					l[i+1][2] = l[i][2];
					l[i][2] = d;

		}
	  }
   }


	for(e=0;e<(n-1)*n/2;e++){
		i=l[e][1];
		j=l[e][2];
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",sz[i][0],sz[i][1],sz[i][2],
											 sz[j][0],sz[j][1],sz[j][2],
											 l[e][0]);
	}
	return 0;
}
int main(){
  int u=0,i,k,t,n,j,s,g,a[1000],b[1000],c[1000],e[1000],f[1000];
  double d[1000],m;
  scanf("%d",&n);
  for(i=0;i<n;i++){
     scanf("%d%d%d",&a[i],&b[i],&c[i]);
  }
  for(j=0;j<n-1;j++){
    for(i=j,t=j+1;t<n;t++){
      d[u]=sqrt(pow(a[i]-a[t],2)+pow(b[i]-b[t],2)+pow(c[i]-c[t],2));
	  e[u]=i;
	  f[u]=t;
	  u++;
	}
  }
  for(k=1;k<=u;k++){
    for(i=0;i<u-k;i++){
	  if(d[i]<d[i+1]){
	    m=d[i];
		d[i]=d[i+1];
		d[i+1]=m;
		s=e[i];
		e[i]=e[i+1];
		e[i+1]=s;
		g=f[i];
		f[i]=f[i+1];
		f[i+1]=g;
	  }
	}
  }
for(i=0;i<u;i++){
  printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",a[e[i]],b[e[i]],c[e[i]],a[f[i]],b[f[i]],c[f[i]],d[i]);
}  

return 0;
}
struct dian
	{
		int a;
		int b;
		int c;
	}zb[11];
int main()
{
	
	int q,n,i,j,s=1,k1[50],k2[50],h1;
	double k[50]={0},h;
	cin>>n;
	for(i=1;i<=n;i++)
	{
		cin>>zb[i].a>>zb[i].b>>zb[i].c;
	}
	for(i=1;i<=n-1;i++)
	{
		for(j=i+1;j<=n;j++)
		{
			k[s]=sqrt((zb[i].a-zb[j].a)*(zb[i].a-zb[j].a)+(zb[i].b-zb[j].b)*(zb[i].b-zb[j].b)+(zb[i].c-zb[j].c)*(zb[i].c-zb[j].c));
			k1[s]=i;
			k2[s]=j;
			s++;
		}
	}
	for(i=1;i<=n*(n-1)/2-1;i++)
	{
		for(j=1;j<=n*(n-1)/2-i;j++)
		{
			if(k[j]<k[j+1])
			{
				h=k[j];
				k[j]=k[j+1];
				k[j+1]=h;
				h1=k1[j];
				k1[j]=k1[j+1];
				k1[j+1]=h1;
				h1=k2[j];
				k2[j]=k2[j+1];
				k2[j+1]=h1;	
			}
		}
	}
	for(i=1;i<=n*(n-1)/2;i++)
	{
		cout<<"("<<zb[k1[i]].a<<","<<zb[k1[i]].b<<","<<zb[k1[i]].c<<")-("<<zb[k2[i]].a<<","<<zb[k2[i]].b<<","<<zb[k2[i]].c<<")=";
		printf("%.2f",k[i]);
		cout<<endl;
	}
	cin>>q;
	return 0;
}
int main()
{
    int n; cin>>n;
    int a[20][3];
    double ss[200];
    int s[200][7];
    for (int i=0;i<n;i++)
    {
        for (int j=0;j<3;j++)
            cin>>a[i][j];
    }

    int x,y,z,count=0;

    for (int i=0;i<n;i++)
        for (int j=i+1;j<n;j++)
            {
                x=a[i][0]-a[j][0];
                y=a[i][1]-a[j][1];
                z=a[i][2]-a[j][2];

                ss[count]=sqrt(x*x+y*y+z*z);
                s[count][1]=a[i][0]; s[count][2]=a[i][1]; s[count][3]=a[i][2];
                s[count][4]=a[j][0]; s[count][5]=a[j][1]; s[count][6]=a[j][2];
                count++;
            }

    int temp;
    for (int i=0;i<count;i++)
        for (int j=0;j<count-1;j++)
            {
                if (ss[j]<ss[j+1])
                    {
                        double temp2=ss[j]; ss[j]=ss[j+1]; ss[j+1]=temp2;
                        temp=s[j][1]; s[j][1]=s[j+1][1]; s[j+1][1]=temp;
                        temp=s[j][2]; s[j][2]=s[j+1][2]; s[j+1][2]=temp;
                        temp=s[j][3]; s[j][3]=s[j+1][3]; s[j+1][3]=temp;
                        temp=s[j][4]; s[j][4]=s[j+1][4]; s[j+1][4]=temp;
                        temp=s[j][5]; s[j][5]=s[j+1][5]; s[j+1][5]=temp;
                        temp=s[j][6]; s[j][6]=s[j+1][6]; s[j+1][6]=temp;
                    }
            }
    for (int i=0;i<count;i++)
        printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",s[i][1],s[i][2],s[i][3],s[i][4],s[i][5],s[i][6],ss[i]);


    return 0;
}
int main(){
	int n,l=0,x[101],y[101],z[101],a[101],b[101],i;
    double m[101];
	scanf("%d\n",&n);
		for(i=0;i<n;i++){
		scanf("%d %d %d",&x[i],&y[i],&z[i]);
		}
		for(int k=0;k<n-1;k++){
			for(i=k+1;i<n;i++){
		m[l]=sqrt(1.0*(x[k]-x[i])*(x[k]-x[i])+1.0*(y[k]-y[i])*(y[k]-y[i])+1.0*(z[k]-z[i])*(z[k]-z[i]));
		
		a[l]=k;
		b[l]=i;
		l++;	}
		}
        for(int k=1;k<=l;k++){
		   double e;
		   for(i=0;i<l-k;i++){
			   if(m[i]<m[i+1]){
			   e=m[i+1];
			   m[i+1]=m[i];
			   m[i]=e;

			   e=a[i+1];
			   a[i+1]=a[i];
			   a[i]=e;

			   e=b[i+1];
			   b[i+1]=b[i];
			   b[i]=e;
			   }
		   }
		}
		for(i=0;i<l;i++){
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",x[a[i]],y[a[i]],z[a[i]],x[b[i]],y[b[i]],z[b[i]],m[i]);}
        return 0;

}
int main(){
    int i,j,k,m,n,x;
    double e;
    scanf("%d",&n);
    int sz[10][3];
    for(i=0;i<n;i++){
        for(j=0;j<3;j++){
            scanf("%d",&sz[i][j]);
        }
    }
    double s[50];
    m=0;
    double zong;
    int a[50][3];
     int b[50][3];
    for(j=0;j<(n-1);j++){
        for(i=j+1;i<=n-1;i++){
            zong=0;
            for(k=0;k<3;k++){
                a[m][k]=sz[j][k];
                b[m][k]=sz[i][k];
                zong=zong+pow((a[m][k]-b[m][k]),2);
            }
            s[m]=sqrt(zong);
            m=m+1;
        }       
    }
    for(j=0;j<m-1;j++){
        for(i=0;i<m-1-j;i++){
            if(s[i]<s[i+1]){
               e=s[i];
               s[i]=s[i+1];
               s[i+1]=e;
               for(k=0;k<3;k++){
                   x=a[i][k];
                   a[i][k]=a[i+1][k];
                   a[i+1][k]=x;
                   x=b[i][k];
                   b[i][k]=b[i+1][k];
                   b[i+1][k]=x;
               }
            }
        }
    }
    for(i=0;i<m;i++){
        printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",a[i][0],a[i][1],a[i][2],b[i][0],b[i][1],b[i][2],s[i]);
    }
    return 0;
}
int main()
{
	int n;
	scanf("%d",&n);
	double x[150],y[150],z[150];
	int i;
	for(i=1;i<=n;i++)
	{
		scanf("%lf",&x[i]);
		scanf("%lf",&y[i]);
		scanf("%lf",&z[i]);
	}
	int j,h;
	h=1;
	double sum;
	double s1[150][150],s2[150][150];
	double a[10000];
	for(i=1;i<n;i++)
	{
		for(j=i+1;j<=n;j++)
		{
			sum=(x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j])+(z[i]-z[j])*(z[i]-z[j]);
			s1[i][j]=sqrt(sum);
			s2[i][j]=s1[i][j];
			a[h]=s1[i][j];
			h++;
		}
	}
	h--;
	int k;
	double e;
	for(k=1;k<h;k++)
	{
		for(i=1;i<=h-k;i++)
		{
			if(a[i]<a[i+1])
			{
				e=a[i];
				a[i]=a[i+1];
				a[i+1]=e;
			}
		}
	}
	int count=2;
	double b[10000];
	b[1]=a[1];
	for(i=2;i<=h;i++)
	{
		if(a[i]!=a[i-1])
		{
			b[count]=a[i];
			count++;
		}
	}
	count--;
	for(k=1;k<=count;k++)
	{
		for(i=1;i<n;i++)
		{
			for(j=i+1;j<=n;j++)
			{
				if(s1[i][j]==b[k])
					printf("(%.0lf,%.0lf,%.0lf)-(%.0lf,%.0lf,%.0lf)=%.2lf\n",x[i],y[i],z[i],x[j],y[j],z[j],b[k]);
			}
		}
	}
	return 0;
}
int main()
{
	struct 
	{
		float first; float second;float distance;
	}b[100],temp;
	float a[11][3];
	int p,q,n,k=0,i,j;
	cin>>n;
	for(i=0;i<n;i++)
	{
		for(j=0;j<3;j++)
			cin>>a[i][j];

	}
	for(i=0;i<n;i++)
	{
		for(j=i+1;j<n;j++)
		{
			b[k].first=i;
			b[k].second=j;
			b[k].distance=sqrt(fabs(pow((a[i][0]-a[j][0]),2)+pow((a[i][1]-a[j][1]),2)+pow((a[i][2]-a[j][2]),2)));
			k++;
		}
	}
	for(i=0;i<n*(n-1)/2-1;i++)
	{
		for(j=n*(n-1)/2-1;j>i;j--)
		{
			if(b[j].distance>b[j-1].distance)
			{
				temp=b[j];b[j]=b[j-1];b[j-1]=temp;
			}
		}
	}
	for(i=0;i<n*(n-1)/2;i++)
	{
		p=b[i].first;
		q=b[i].second;
		cout<<"("<<a[p][0]<<","<<a[p][1]<<","<<a[p][2]<<")-("<<a[q][0]<<","<<a[q][1]<<","<<a[q][2]<<")="<<fixed<<setprecision(2)<<b[i].distance<<fixed<<setprecision(0)<<endl;
	}
	return 0;
}
int main()
{   
	int i,n,j,k=0;
	
	struct  zuobiao
	{
        int x;
		int y;
		int z;
	} a[10];
	struct  juli
	{
		double d;
		struct zuobiao  a1;
		struct zuobiao  b1;
	}    b[100],tem;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d%d%d",&a[i].x,&a[i].y,&a[i].z);
	}
	for(i=0;i<n;i++)
	{
		for(j=i+1;j<n;j++)
		{
			b[k].d=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));
			b[k].a1=a[i];
			b[k].b1=a[j];
			k++;
		}
	}
	n=n*(n-1)/2;
	for(i=1;i<n;i++)                     //????
	{
		for(j=i;j>0;j--)
		{
			if(b[j].d>b[j-1].d)  
			{
                  tem=b[j];
				  b[j]=b[j-1];
				  b[j-1]=tem;
			}
		}
	}
	for(i=0;i<n;i++)
	{
	  printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",b[i].a1.x,b[i].a1.y,b[i].a1.z,b[i].b1.x,b[i].b1.y,b[i].b1.z,b[i].d);
	}
	return 0;
}
struct node {
       int x,y,z;
}p[10];
struct edge{
       int node1,node2;
       double dis;
}t[100];
double dist(int a,int b)
{
       return sqrt((p[a].x-p[b].x)*(p[a].x-p[b].x)+(p[a].y-p[b].y)*(p[a].y-p[b].y)+(p[a].z-p[b].z)*(p[a].z-p[b].z));
}
int judge(int x,int y)
{
     if (t[x].node1<t[y].node1 || (t[x].node1==t[y].node1 && t[x].node2<t[y].node2))
		 return 0;
     else return 1;
}
int main()
{
    int n,l=0,a,b,i,j;
    scanf("%d",&n);
    for (i=0;i<n;i++) scanf("%d%d%d",&p[i].x,&p[i].y,&p[i].z);
    for (i=0;i<n;i++)
	{
        for (j=i+1;j<n;j++)
		{
            l++; 
			t[l].dis=dist(i,j);
			t[l].node1=i;
			t[l].node2=j;
            }
    }
    for (i=1;i<=l;i++)
	{
        for (j=i+1;j<=l;j++)
		{
            if (t[i].dis<t[j].dis || (t[i].dis==t[j].dis && judge(i,j)))
			{
               t[56]=t[i];
			   t[i]=t[j];
			   t[j]=t[56];
            }
        }
    }
    for (i=1;i<=l;i++)
	{
         a=t[i].node1;
		b=t[i].node2;
        printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",p[a].x,p[a].y,p[a].z,p[b].x,p[b].y,p[b].z,t[i].dis);
    }
    return 0;
}
int main(){
	int n,x[100],y[100],z[100],i,j,k,a[100],b[100],c[100],d[100],e[100],f[100],m,o;
	double dis[1000],p;
	scanf("%d",&n);
	m=(n-1)*n/2;
	for(i=1;i<=n;i++){
		scanf("%d%d%d",&x[i],&y[i],&z[i]);
	}
	for(i=1,k=1;i<=n-1;i++){
		for(j=i+1;j<=n;j++){
			a[k]=x[i];
			b[k]=y[i];
			c[k]=z[i];
			d[k]=x[j];
			e[k]=y[j];
			f[k]=z[j];
            dis[k]=sqrt((1.0*a[k]-d[k])*(a[k]-d[k])+(b[k]-e[k])*(b[k]-e[k])+(c[k]-f[k])*(c[k]-f[k]));
			k++;
		}
	}
	for(i=1;i<=m;i++){
		for(k=1;k<=m-i;k++){
			if(dis[k]<dis[k+1]){
				o=a[k+1];
				a[k+1]=a[k];
				a[k]=o;
				o=b[k+1];
				b[k+1]=b[k];
				b[k]=o;
				o=c[k+1];
				c[k+1]=c[k];
				c[k]=o;
				o=d[k+1];
				d[k+1]=d[k];
				d[k]=o;
				o=e[k+1];
				e[k+1]=e[k];
				e[k]=o;
				o=f[k+1];
				f[k+1]=f[k];
				f[k]=o;
				p=dis[k+1];
				dis[k+1]=dis[k];
				dis[k]=p;
			}
		}
	}
	for(i=1;i<=m;i++){
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",a[i],b[i],c[i],d[i],e[i],f[i],dis[i]);
	}
	return 0;
}
double julishi(int a,int b,int c,int x,int y,int z);
int main(){
int n,dzb,i,j,k,m,N;
scanf("%d",&n);
int x[1000],y[1000],z[1000];
N=3*n;
for(i=0;i<N;i++){
	scanf("%d%d%d",&(x[i]),&(y[i]),&(z[i]));
}
m=n*(n-1)/2;
double jl[10000];
int ax[10000],ay[10000],az[10000];
int bx[10000],by[10000],bz[10000];
k=1;
for(i=0;i<n-1;i++){
	for(j=i+1;j<n;j++){
		jl[k]=julishi(x[i],y[i],z[i],x[j],y[j],z[j]);
		ax[k]=x[i],ay[k]=y[i],az[k]=z[i],bx[k]=x[j],by[k]=y[j],bz[k]=z[j];
		k++;
	}
}
double e;
int f;
for(k=1;k<=m;k++){
  for(j=1;j<=m-k;j++){
	if(jl[j]<jl[j+1]){
		e=jl[j];
	    jl[j]=jl[j+1];
		jl[j+1]=e;
		f=ax[j];ax[j]=ax[j+1];ax[j+1]=f;
		f=ay[j];ay[j]=ay[j+1];ay[j+1]=f;
		f=az[j];az[j]=az[j+1];az[j+1]=f;
		f=bx[j];bx[j]=bx[j+1];bx[j+1]=f;
		f=by[j];by[j]=by[j+1];by[j+1]=f;
		f=bz[j];bz[j]=bz[j+1];bz[j+1]=f;
	   }
  }
}
for(j=1; j<=m;j++){
printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",ax[j],ay[j],az[j],bx[j],by[j],bz[j],jl[j]);
}
return 0;
}
double julishi(int a,int b,int c,int x,int y,int z){
double jl;
int sum;
sum=(a-x)*(a-x)+(b-y)*(b-y)+(c-z)*(c-z);
jl=sqrt(sum);
return jl;
}