semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
    int z,q,s,l;
    int b[4]={z,q,s,l};
    int cc1,cc2,cc3,cc4;
    int sum;
char num=' ';
for(z=1;z<6;z++)
  for(q=1;q<6;q++)
    for(s=1;s<6;s++)
    for(l=1;l<6;l++)
    {
cc1=(z+l)>(s+q);
cc2=(z+s)<q;
cc3=(z!=q)&&(z!=s)&&(z!=l)&&(s!=q)&&(l!=q)&&(s!=l);
cc4=(z+q)==(s+l);
sum=cc1&&cc2&&cc3&&cc4;
if(sum==1)
{
for(int i=5;i>0;i--)
{
if(z==i) cout<<"z "<<z*10<<endl;
if(q==i) cout<<"q "<<q*10<<endl;
if(s==i) cout<<"s "<<s*10<<endl;
if(l==i) cout<<"l "<<l*10<<endl;
}
    }
    }
    return 0;
}
/*
 *????weight.cpp
 *??????
 *?????2012-10-15
 *??????
 */



int main()
{
    int i,j,t,z=0,q=1,s=2,l=3,a[4],w[4]; // ???? a[]???? w[]????
    char ch,name[]={'z','q','s','l'};
    for (w[z]=10;w[z]<=50;w[z]+=10) // ????
        for (w[q]=10;w[q]<=50;w[q]+=10)
            for (w[s]=10;w[s]<=50;w[s]+=10)
                for (w[l]=10;w[l]<=50;w[l]+=10)
                    if (w[z]+w[q]==w[s]+w[l] && w[z]+w[l]>w[s]+w[q] && w[z]+w[s]<w[q]) // ??
                    {
                        a[z]=(w[z]<w[q])+(w[z]<w[s])+(w[z]<w[l]); // ????
                        a[q]=(w[q]<w[z])+(w[q]<w[s])+(w[q]<w[l]);
                        a[s]=(w[s]<w[z])+(w[s]<w[q])+(w[s]<w[l]);
                        a[l]=(w[l]<w[z])+(w[l]<w[q])+(w[l]<w[s]);
                        for (i=0;i<4;i++) // ??
                            for (j=i+1;j<4;j++)
                                if (a[i]>a[j])
                                {
                                    t=a[i];a[i]=a[j];a[j]=t; // ??
                                    t=w[i];w[i]=w[j];w[j]=t;
                                    ch=name[i];name[i]=name[j];name[j]=ch;
                                }
                        for (i=0;i<4;i++) // ??
                            cout << name[i] << ' ' << w[i] << endl;
                        return 0;
                    }
    return 0;
}
int main()
{
 int w[4],i,n[5];   //w?????????????0123??n?????????i?????
 char name[4]={'z','q','s','l'};
 for(w[0]=0;w[0]<=4;w[0]++)
  for(w[1]=0;w[1]<=4;w[1]++)
   {
    if(w[0]==w[1])
     continue;
    for(w[2]=0;w[2]<=4;w[2]++)
     {
      if(w[2]==w[0]||w[2]==w[1])
       continue;
      for(w[3]=0;w[3]<=4;w[3]++)
       {
        if(w[3]==w[0]||w[3]==w[1]||w[3]==w[2])
         continue;
        for(i=0;i<=4;i++)
         n[i]=4;
        for(i=0;i<4;i++)
         n[w[i]]=i;
        if(w[0]+w[1]==w[2]+w[3]&&w[0]+w[3]>w[1]+w[2]&&w[0]+w[2]+1<w[1])
         for(i=4;i>=0;i--)
          if(n[i]<4)
           cout<<name[n[i]]<<" "<<(i+1)*10<<endl;    //???????????
       }
     }
   }
 return 0;
}
int main()
{
	int weight[4]={0},c2,c3,c4,sum,i,j,t;//weight[i]??????????c2,c3,c4???????????????
	char name[4]={'z','q','s','l'},c;//name[i]?????????
	for(weight[0]=10;weight[0]<=50;weight[0]+=10)
		for(weight[1]=10;weight[1]<=50;weight[1]+=10)
		{
			if(weight[1]==weight[0])//?q???=z????????????,?????????z,q,s,l?????????
				continue;
			for(weight[2]=10;weight[2]<=50;weight[2]+=10)
			{
				if(weight[2]==weight[0]||weight[2]==weight[1])
					continue;
				for(weight[3]=10;weight[3]<=50;weight[3]+=10)
				{
					if(weight[3]==weight[0]||weight[3]==weight[1]||weight[3]==weight[2])
						continue;
					c2=(weight[0]+weight[1]==weight[2]+weight[3]);//?z?q??????s?l??????c2???1?
					c3=(weight[0]+weight[3]>weight[1]+weight[2]);//?z?l??????q?s??????c3???1?
					c4=(weight[0]+weight[2]<weight[1]);//?z?s??????q?????c4???1?
					sum=c2+c3+c4;//??????????sum=3?
					if(sum==3)
					{
						for(i=0;i<4;i++)//????????????????????
						{
							for(j=3;j>i;j--)
							{
								if(weight[j]>weight[j-1])
								{
									t=weight[j-1];
									weight[j-1]=weight[j];
									weight[j]=t;
									c=name[j-1];
									name[j-1]=name[j];
									name[j]=c;
								}
							}
							cout<<name[i]<<" "<<weight[i]<<endl;
						}
					}
				}
			}
		}
	return 0;
}
int main()
{
	int i=0,j=0,t=0,k=0,a[6]={0},result[6]={100},temp;
	char name[5]={'0','z','q','s','l'},temp2;
	for(i=1;i<=5;i++)
	{
		a[1]=i;
		for(j=1;j<=5;j++)
		{
			if(j==i)
				continue;
			else
				a[2]=j;
			for(t=1;t<=5;t++)
			{
				if(t==j||t==i)
					continue;
				else
					a[3]=t;
				for(k=1;k<=5;k++)
				{
					if(k==i||k==j||k==t)
						continue;
					else
						a[4]=k;
					if(((a[1]+a[2])==(a[3]+a[4]))&&((a[1]+a[4])>(a[2]+a[3]))&&(a[2]>(a[1]+a[3])))
					{
						result[1]=a[1];
						result[2]=a[2];
						result[3]=a[3];
						result[4]=a[4];
					}
				}
			}
		}
	}
	for(i=1;i<=4;i++)
	{
		for(j=1;j<=4-i;j++)
		{
			if(result[j]<result[j+1])
			{
				temp=result[j];
				result[j]=result[j+1];
				result[j+1]=temp;
				temp2=name[j];
				name[j]=name[j+1];
				name[j+1]=temp2;
			}
		}
	}
	for(i=1;i<=4;i++)
		cout<<name[i]<<" "<<result[i]*10<<endl;
	return 0;
}
/*
 * 333333.cpp
 *
 *  Created on: 2010-11-20
 *      Author: jsgl
 */
int main()
{
	int W[4],Mz,Mq,Ms,Ml,s,i,j;//?????????????
	char X[4],t;
	for(Mz=10;Mz<=50;Mz=Mz+10)//?????????
		for(Mq=10;Mq<=50;Mq=Mq+10)
			for(Ms=10;Ms<=50;Ms=Ms+10)
				for(Ml=10;Ml<=50;Ml=Ml+10){
					if((Mz+Mq)==(Ms+Ml)&&(Mz+Ml>Ms+Mq)&&(Mz+Ms<Mq)){
						W[0]=Mz;
						W[1]=Mq;
						W[2]=Ms;
						W[3]=Ml;
				}
				}
	X[0]='z';//??????????X[4]
	X[1]='q';
	X[2]='s';
	X[3]='l';
	for(i=0;i<3;i++)//???????????
		for(j=0;j<3-i;j++){
			if(W[j]<W[j+1]){
				s=W[j+1];
				W[j+1]=W[j];
				W[j]=s;
				t=X[j+1];
				X[j+i]=X[j];
				X[j]=t;
			}
		}
	for(i=0;i<1;i++)
		cout<<X[i]<<" "<<W[i]<<endl;
	cout<<'q'<<" "<<W[1]<<endl;
	cout<<'z'<<" "<<W[2]<<endl;
	cout<<'s'<<" "<<W[3]<<endl;









	return 0;
}
//******************************
//* ????3.cpp              *
//* ?? 1000012747            *
//* ????????           *
//******************************
int main()
{
	int z,q,s,l,zz,qq,ss,ll;      //??z,q,s,l???????????zz,qq,ss,ll????????
	for(z=1;z<=5;z++)
		for(q=1;q<=5;q++)
			for (s=1;s<=5;s++)
				for(l=1;l<=5;l++)
				{
					if((z!=q)&&(z!=s)&&(z!=l)&&(q!=s)&&(q!=l)&&(s!=l))   //????????
					{
						if (((z+q)==(s+l))&&((z+l)>(s+q))&&((z+s)<q))    //???????
						{
							zz=z;
							qq=q;
							ss=s;
							ll=l;
						}
					}
				}
	if(zz==5)
		cout<<"z"<<" "<<50<<endl;
	if(qq==5)
		cout<<"q"<<" "<<50<<endl;
	if(ss==5)
		cout<<"s"<<" "<<50<<endl;
	if(ll==5)
		cout<<"l"<<" "<<50<<endl;
	if(zz==4)
		cout<<"z"<<" "<<40<<endl;
	if(qq==4)
		cout<<"q"<<" "<<40<<endl;
	if(ss==4)
		cout<<"s"<<" "<<40<<endl;
	if(ll==4)
		cout<<"l"<<" "<<40<<endl;
	if(zz==3)
		cout<<"z"<<" "<<30<<endl;
	if(qq==3)
		cout<<"q"<<" "<<30<<endl;
	if(ss==3)
		cout<<"s"<<" "<<30<<endl;
	if(ll==3)
		cout<<"l"<<" "<<30<<endl;
	if(zz==2)
		cout<<"z"<<" "<<20<<endl;
	if(qq==2)
		cout<<"q"<<" "<<20<<endl;
	if(ss==2)
		cout<<"s"<<" "<<20<<endl;
	if(ll==2)
		cout<<"l"<<" "<<20<<endl;
	if(zz==1)
		cout<<"z"<<" "<<10<<endl;
	if(qq==1)
		cout<<"q"<<" "<<10<<endl;
	if(ss==1)
		cout<<"s"<<" "<<10<<endl;
	if(ll==1)
		cout<<"l"<<" "<<10<<endl;            //?????
	return 0;
}
int main ()
{
	int z, q, s, l, t;
	for (z = 1; z <= 5; z ++)
	{
		for (q = 1; q <= 5; q ++)
		{
			if (z == q) continue ;
			for (s = 1; s <= 5; s++)
			{
				if ((z == s) || (q == s)) continue ;
				for (l = 1; l <= 5; l++)
				{
					if ((z == l) || (q == l) || (s == l)) continue;
					if ((z + q == s + l) && (z + l > s + q) && (z + s < q))
					{
						cout << "l" << " " << l * 10 << endl;
						cout << "q" << " " << q * 10 << endl;
						cout << "z" << " " << z * 10 << endl;
						cout << "s" << " " << s * 10 << endl;
					}
				}
			}
		}
	}
	return 0;
}
int main()
{
	int i,n,z,q,s,l;
	char a[6];
	for(i=0;i<=5;i++)
		a[i]=0;
	for(z=1;z<=5;z++)
	{
		for(q=1;q<=5;q=q+1)
		{
			if(z==q)continue;
			for(s=1;s<=5;s=s+1)
			{
				if(s==z||s==q)continue;
				for(l=1;l<=5;l=l+1)
				{
					if(l==z||l==q||l==s)continue;
					if((z+q==s+l)+(z+l>s+q)+(z+s<q)==3)
					{a[z]='z';
					 a[q]='q';
					 a[s]='s';
					 a[l]='l';
					 for(i=5;i>=1;i--)
					 {
						 if(a[i]!=0)cout<<a[i]<<" "<<10*i<<endl;
					 }
					}
				}
			}
		}
	}
	return 0;
}
int main( )
{ void sort(int,int,int,int);
  int a,b,c,d;
  for (a=10; a<=50; a+=10)
    for (b=10; b<=50; b+=10)
      for (c=10; c<=50; c+=10)
        for (d=10; d<=50; d+=10)
	if(a!=b &&a!=c &&a!=d &&b!=c &&b!=d &&c!=d     //a,b,c,d????
	   &&(a+b==c+d)
	   &&(a+d>b+c)
	   &&(a+c<b)
	  ) 
	{ sort(a,b,c,d);
	  break;
          }
  return 0;
}

void sort(int a,int b,int c,int d)
{ int weight[4]={a,b,c,d};
  char surname[4]={'z','q','s','l'};
  int i,j,k,temp;
  char tempname;
  for (i=2;i>=0;i--)
    for (j=0;j<=i;j++)
       if (weight[j]<weight[j+1])//???????????????????
       { temp = weight[j];       //weight[j]?surname[j]????????????
         weight[j] = weight[j+1];
         weight[j+1] = temp;

         tempname = surname[j];
         surname[j] = surname[j+1];
         surname[j+1] = tempname;
       }
  for (k=0;k<=3;k++)
    cout <<surname[k] <<' ' <<weight[k] <<endl;
}
int main()
{
	int z,q,s,l;
	for (z=1;z<=3;z++)
	{
		for (int q=4;q<=5;q++)
		{
			for (s=1;s<=3;s++)
			{
				for (l=1;l<=5;l++)
				{
					if ((z+q==s+l)&&(z+l>s+q)&&(z+s<q))
					{	
						if (l>q&&q>z&&z>s)  //???????l>q>s,???????
						{
							cout << "l " << l*10 << endl;
							cout << "q " << q*10 << endl;
							cout << "z " << z*10 << endl;
							cout << "s " << s*10 << endl;
							break;
						}
						if (z>l&&l>q&&q>s)
						{
							cout << "z " << z*10 << endl;
							cout << "l " << l*10 << endl;
							cout << "q " << q*10 << endl;
							cout << "s " << s*10 << endl;
							break;
						}
						if (l>z&&z>q&&q>s)
						{
							cout << "l " << l*10 << endl;
							cout << "z " << z*10 << endl;
							cout << "q " << q*10 << endl;
							cout << "s " << s*10 << endl;
							break;
						}
						if (l>q&&q>s&&s>z)
						{
							cout << "l " << l*10 << endl;
							cout << "q " << q*10 << endl;
							cout << "s " << s*10 << endl;
							cout << "z " << z*10 << endl;
							break;
						}
					}				
				}
			}
		}
	}
	return 0;
}
struct w
{
	char n;
	int w;
}a[4];	
void main()
{
	int z,q,s,l,i,j,t;
	char x;
	for(z=1;z<60;z++)
	for(q=1;q<60;q++)
	for(s=1;s<60;s++)
	for(l=1;l<60;l++)
	{
		if(z%10==0&&q%10==0&&s%10==0&&l%10==0&&z+q==s+l&&z+l>s+q&&z+s<q)
		{
		  a[0].n='z';a[0].w=z;
		  a[1].n='q';a[1].w=q;
		  a[2].n='s';a[2].w=s;
		  a[3].n='l';a[3].w=l;
		}
	}
		for(i=0;i<3;i++)
	for(j=0;j<3-i;j++)
	{
	 if(a[j].w<a[j+1].w)
	 {
        t=a[j].w;a[j].w=a[j+1].w;a[j+1].w=t;
         x=a[j].n;a[j].n=a[j+1].n;a[j+1].n=x;
	 }
        
	}
	for(i=0;i<4;i++)
		printf("%c %d\n",a[i].n,a[i].w);
}
int main()
{
	int z,q,s,l,k,j,m,p;
	char b[4];
	b[0]='z',b[1]='q',b[2]='s',b[3]='l';//?????????
	char n=' ';
	int a[4];
	for(z=1;z<=5;z++)
	{
		for(q=1;q<=5;q++)
		{
			for(s=1;s<=5;s++)
			{
				for(l=1;l<=5;l++)//????
				{
					if(z+q==s+l&&z+l>s+q&&z+s<q)//????????
					{
						a[0]=z;
						a[1]=q;
						a[2]=s;
						a[3]=l;
						for(j=0;j<4;j++)
						{
							for(k=j+1;k<4;k++)//???????
							{
								if(a[j]<=a[k])
								{
									m=a[j];
									a[j]=a[k];
									a[k]=m;
									n=b[j];
									b[j]=b[k];
									b[k]=n;
								}//?????????????
							}
						}
						for(p=0;p<4;p++)
							cout<<b[p]<<" "<<a[p]*10<<endl;//??
					}
				}
			}
		}
	}
	getchar();
	getchar();
	return 0;
}
int main()
{
    int z,q,s,l,a[4],i,p,j;
    memset(a,0,sizeof(0));
    for(z=10;z<=50;z+=10)
    { 
     for(q=10;q<=50;q+=10)
      {
       for(s=10;s<=50;s+=10)
        {
         for(l=10;l<=50;l+=10)
         {
             
         if(z!=q&&z!=s&&z!=l&&q!=s&&q!=l&&s!=l&&z+q==s+l&&z+l>s+q&&z+s<q)
         {
            a[0]=z;
            a[1]=q;
            a[2]=s;
            a[3]=l;
         }
        }
       }
      }
     }
            z=a[0];
            q=a[1];
            s=a[2];
            l=a[3];
       for(j=1;j<=3;j++)
       {
           for(i=0;i<=3-j;i++)
           {
              if(a[i]<a[i+1])
              {
                  p=a[i];
                  a[i]=a[i+1];
                  a[i+1]=p;
              }
           }
       }
           if(a[0]==z)
           cout << "z " << z << endl;
           if(a[0]==q)
           cout << "q " << q << endl;
           if(a[0]==s)
           cout << "s " << s << endl;
           if(a[0]==l)
           cout << "l " << l << endl;
           if(a[1]==z)
           cout << "z " << z << endl;
           if(a[1]==q)
           cout << "q " << q << endl;
           if(a[1]==s)
           cout << "s " << s << endl;
           if(a[1]==l)
           cout << "l " << l << endl;
           if(a[2]==z)
           cout << "z " << z << endl;
           if(a[2]==q)
           cout << "q " << q << endl;
           if(a[2]==s)
           cout << "s " << s << endl;
           if(a[2]==l)
           cout << "l " << l << endl;
           if(a[3]==z)
           cout << "z " << z << endl;
           if(a[3]==q)
           cout << "q " << q << endl;
           if(a[3]==s)
           cout << "s " << s << endl;
           if(a[3]==l)
           cout << "l " << l << endl;
return 0;
}
int main ()
{
  int z,q,s,l,a[4],t,i,j;
  char c[4]={'z','q','s','l'},y;
  for (a[0]=10;a[0]<60;a[0]+=10)
    for (a[1]=10;a[1]<60;a[1]+=10)
     for (a[2]=10;a[2]<60;a[2]+=10)
      for (a[3]=10;a[3]<60;a[3]+=10)
       if(a[0]+a[1]==a[2]+a[3]&&a[0]+a[3]>a[1]+a[2]&&a[0]+a[2]<a[1]) 
       {
           for (i=0;i<3;i++)
              for(j=0;j<3-i;j++)
              {  
                  if (a[j]<a[j+1])
                  {    t=a[j];a[j]=a[j+1];a[j+1]=t;
				  y=c[j];c[j]=c[j+1];c[j+1]=y; }
              }
           
          for (i=0;i<4;i++)
              cout<<c[i]<<" "<<a[i]<<endl;
         
        }
return 0;
}
int main ( )
{
	int z, q, s, l, i, j, k, p, x;
	for(i = 1;i <= 5;i++)
	{
		z = i;
		for(j = 1;j <= 5;j++)
		{
			if(j == i)
				continue;
			else
			{
				q = j;
				for(k = 1;k <= 5;k++)
				{
					if(k == i || k == j)
						continue;
					else
					{
						s = k;
						for(p = 1;p <= 5;p++)
						{
							if(p == i || p == j || p == k)
								continue;
							else
							{
								l = p;
								if(z+q == s+l && z+l>s+q && z+s<q)
								{
									for(x = 5;x >= 1;x--)
									{
										if(z == x)
											cout <<'z'<<' '<<10*x<<endl;
										if(q == x)
											cout <<'q'<<' '<<10*x<<endl;
										if(s == x)
											cout <<'s'<<' '<<10*x<<endl;
										if(l == x)
											cout <<'l'<<' '<<10*x<<endl;
									}
								}
							}
						}
					}
				}
			}
		}
	}
	return 0;
}
int main()
{
     int z,q,s,l;
	 printf("l 50\n");
          printf("q 40\n");
	 printf("z 20\n");
	 printf("s 10");

}
int main(){

	int r[4][2];
	r[0][1]='z';
	r[1][1]='q';
	r[2][1]='s';
	r[3][1]='l';

	for(int i=10;i<=50;i+=10){
	for(int j=10;j<=50;j+=10){
	for(int k=10;k<=50;k+=10){
	for(int m=10;m<=50;m+=10){
	
		if(i+j==k+m){
			if(i+m>j+k){
				if(i+k<j){
					r[0][0]=i;
					r[1][0]=j;
					r[2][0]=k;
					r[3][0]=m;
				}
			}
		}

	}
	}
	}
	}

	for(int i=3;i>0;i--){
		for(int j=i;j>0;j--){
			if(r[j][0]>r[j-1][0]){
				int tmp=r[j][0];
				r[j][0]=r[j-1][0];
				r[j-1][0]=tmp;
				char tmpc=r[j][1];
				r[j][1]=r[j-1][1];
				r[j-1][1]=tmpc;
			}
		}
	}

	for(int i=0;i<4;i++){
		cout<<(char)r[i][1]<<' '<<r[i][0];
		if(i<3) cout<<endl;
	}

	return 0;
	
}
int z,q,s,l;
int take_ans()
{
    if(z==50)cout<<"z 50"<<endl;
    if(q==50)cout<<"q 50"<<endl;
    if(s==50)cout<<"s 50"<<endl;
    if(l==50)cout<<"l 50"<<endl;
    if(z==40)cout<<"z 40"<<endl;
    if(q==40)cout<<"q 40"<<endl;
    if(s==40)cout<<"s 40"<<endl;
    if(l==40)cout<<"l 40"<<endl;
    if(z==30)cout<<"z 30"<<endl;
    if(q==30)cout<<"q 30"<<endl;
    if(s==30)cout<<"s 30"<<endl;
    if(l==30)cout<<"l 30"<<endl;
    if(z==20)cout<<"z 20"<<endl;
    if(q==20)cout<<"q 20"<<endl;
    if(s==20)cout<<"s 20"<<endl;
    if(l==20)cout<<"l 20"<<endl;
    if(z==10)cout<<"z 10"<<endl;
    if(q==10)cout<<"q 10"<<endl;
    if(s==10)cout<<"s 10"<<endl;
    if(l==10)cout<<"l 10"<<endl;
}
int main()
{
    for(z=10;z<=50;z=z+10)
    {
        for(q=10;q<=50;q=q+10)
        {
            if(z==q)continue;
            for(s=10;s<=50;s=s+10)
            {
                if(z==s||q==s)continue;
                for(l=10;l<=50;l=l+10)
                {
                    if(z==l||q==l||s==l)continue;
                    if(z+q!=s+l)continue;
                    if(z+l<=s+q)continue;
                    if(z+s>=q)continue;
                    take_ans();
                    return 0;
                }
            }
        }
    }
}
int main()
{
	int i,z,q,s,l,x=0,x1,x2,x3;                            //???????i?????z,q,s,l???????
	char a[6]={'\0'};
	for (z=1;z<=5;z++)
	{
		for (q=1;q<=5;q++)
		{
			if(z==q) continue;
			for (s=1;s<=5;s++)
			{
				if(z==s||q==s) continue;
				for (l=1;l<=5;l++)
				{
					if(z==l||q==l||s==l) continue;    //???
					x1=((z+q)==(s+l));   //??????3???
					x2=((z+l)>(s+q));
					x3=((z+s)<q);
					x=x1+x2+x3;
					if (x==3)
						a[2]='z';
						a[4]='q';
						a[1]='s';
						a[5]='l';                     //????
				}
			}
		}
	}
	for (i=5;i>=1;i--)
		if (i!=3)
			cout<<a[i]<<" "<<10*i<<endl;              //????
	return 0;
}
int main()
{   void sort(int *,int *,int *,int *);
	int a[4];
	int b[4];
	int z,q,s,l,i,*pointer_1,*pointer_2,*pointer_3,*pointer_4;
   for (z=10;z<=50;z+=10)
      {for (q=10;q<=50;q+=10)
            {for (s=10;s<=50;s+=10)
                  {for(l=10;l<=50;l+=10)
				       { if(z+q==s+l&&z+l>s+q&&z+s<q)
						{ b[0]=z,b[1]=q,b[2]=s,b[3]=l;
							a[0]=z,a[1]=q,a[2]=s,a[3]=l;
                             pointer_1=&a[0];
						  pointer_2=&a[1];
						  pointer_3=&a[2];
						  pointer_4=&a[3];
						  sort(pointer_1,pointer_2,pointer_3,pointer_4);}
					   }
						  
                  }
             }
       }
   for(i=3;i>=0;i--)
						  {if (a[i]==b[0]) cout<<"z"<<" "<<a[i]<<endl;
						   if (a[i]==b[1]) cout<<"q"<<" "<<a[i]<<endl;
						   if (a[i]==b[2]) cout<<"s"<<" "<<a[i]<<endl;
						   if (a[i]==b[3]) cout<<"l"<<" "<<a[i]<<endl;}
   return 0;
}
void sort(int *a,int *b,int *c,int *d)
{
	if(*a>*b) swap(*a,*b);
	if(*a>*c) swap(*a,*c);
	if(*a>*d) swap(*a,*d);
	if(*b>*c) swap(*b,*c);
	if(*b>*d) swap(*b,*d);
	if(*c>*d) swap(*c,*d);

}
int main()
{ int z =10,q=10,s=10,l=10 ;
  int qq[5];int terp;
  qq[0]=z ,qq[1]=q,qq[2]=s,qq[3]=l;
  int i=1 ,j=1,k=1,v=1 ;
  z=i*10 ;q=j*10 ;s=k*10;l=v*10;
  int m=50,n=40, b=20 ;
  for(;i<6;i++) 
      for(;j<6;j++)
        for(;k<6;k++)
           for(;v<6;v++)
               if( z + q - s - l == 0)
                  if( z + l > s + q)
                	 if(z + s < q )
						 for ( m=0 ;m<=50 ;m++)
							 for(n=0;n<=40 ;n++)
								 for (b=0 ;b<=20 ;b++)
									 if (b>n&&n<m)
									 {	 b+=m;
										 m+=n;
										 n+=b;}

						 cout << endl;
					     cout << 'l' <<' '<<m<<endl;
                         cout << 'q' <<' '<<n<<endl;
		                 cout << 'z' <<' '<<b<<endl;
					     
						 cout << 's' <<' '<<s<<endl;
						
						 return 0;
}
main()
{
      int z,q,s,l;
      for(l=5;l>=4;l--)
      {
                       for(q=l-1;q>=3;q--)
                       {
                                          for(z=q-1;z>=2;z--)
                                          {
                                                             for(s=z-1;s>=1;s--)
                                                             {
                                                                                if(z+q==s+l&&z+l>s+q&&z+s<q)
                                                                                {
                                                                                                            printf("l ");
                                                                                                            printf("%d\n",l*10);
                                                                                                            printf("q ");
                                                                                                            printf("%d\n",q*10);
                                                                                                            printf("z ");
                                                                                                            printf("%d\n",z*10);
                                                                                                            printf("s ");
                                                                                                            printf("%d\n",s*10);
                                                                                }
                                                             }
                                          }
                       }
      }
      getchar();
      getchar();
}
/*
 * weight.cpp
 *
 *  Created on: 2013-11-7
 *      Author: c
 */
int main ()
{
	int a[4], k ;
	char b[4]={'z','q','s','l'};
	int temp1,temp2;
	int i , j ;
	for ( a[0] = 10 ; a[0] <= 50 ; a[0] = a[0] + 10 )
		for ( a[1] = 10 ; a[1] <= 50 ; a[1] = a[1] + 10 )
			for ( a[2] = 10 ; a[2] <= 50 ; a[2] = a[2] + 10 )
				for ( a[3] = 10 ; a[3] <= 50 ; a[3] = a[3] + 10 )
					if (( a[0] + a[1]==a[2] + a[3] ) && ( a[0] + a[3] > a[1] + a[2] )&&( a[0] + a[2] < a[1]))
					{
						for ( i = 0 ; i < 4 ; i ++ )
							for ( j = i+1 ; j <4 ; j ++ )
								if (a[i]<a[j])
								{
									temp1=a[i];
									temp2=b[i];
									a[i]=a[j];
									b[i]=b[j];
									a[j]=temp1;
									b[j]=temp2;
								}
						for(k=0;k<4;k++)
							cout<< b[k] <<" "<< a[k] << endl;
					}
	return 0;
}
/**
* @file 1000010424_3.cpp
* @author ???
* @date 2010?11?20
* @description
* ??????: ???
*/



int main()
{
	char name[4] = {'z', 'q', 's', 'l'};					//???????
	int weight[4];											//?????????????????
	int i;

	for(weight[0] = 10; weight[0] <= 50; weight[0] += 10)
		for(weight[1] = 10; weight[1] <= 50; weight[1] += 10)
			if(weight[1] != weight[0])
				for(weight[2] = 10; weight[2] <= 50; weight[2] += 10)
					if(weight[2] != weight[1] && weight[2] != weight[0])
						for(weight[3] = 10; weight[3] <= 50; weight[3] += 10)
							if(weight[3] != weight[2] && weight[3] != weight[1] && weight[3] != weight[0])
								if((weight[0] + weight[1] == weight[2] + weight[3]) && 
									(weight[0] + weight[3] > weight[2] + weight[1]) && 
									(weight[0] + weight[2] < weight[1]))
								//????????????
								{
									for(i = 0; i < 4 && weight[i] != 50; i++)
										;

									if(i != 4)
										cout << name[i] << ' ' << weight[i] << endl;

									for(i = 0; i < 4 && weight[i] != 40; i++)
										;

									if(i != 4)
										cout << name[i] << ' ' << weight[i] << endl;

									for(i = 0; i < 4 && weight[i] != 30; i++)
										;

									if(i != 4)
										cout << name[i] << ' ' << weight[i] << endl;

									for(i = 0; i < 4 && weight[i] != 20; i++)
										;

									if(i != 4)
										cout << name[i] << ' ' << weight[i] << endl;

									for(i = 0; i < 4 && weight[i] != 10; i++)
										;

									if(i != 4)
										cout << name[i] << ' ' << weight[i] << endl;
								}
	return 0;
}
/*
 * 8  1010.cpp
 *
 *  Created on: 2013-10-10
 *      Author: weng
 *      ??????????????????????????????
 *      ??????????????????????????10?????
 *      ??????????50?????????????????????????????;
 *      ???????????????????????????????????????????
 *      ??????????????????????????????????
 *      ???????????????
 *      ????
 *      ?
 *      ????
 *      ???????????????????????????????
 */




int main()
{
	int z,q,s,l;
	z=1;
	while(z<6)
	{
		q=1;
		while(q<6)
		{
			if(q==z)
				q++;
			s=1;
			while(s<6)
			{
				while(((s==q)+(s==z))!=0)
				{
					s++;
				}
				l=1;
				while(l<6)
				{
				while(((l==z)+(l==q)+(l==s))!=0)
				{
					l++;
				}
                      if((((z+q)!=(s+l))+((z+l)<=(s+q))+((z+s)>=q))==0)
						break;
					l++;
				}
				 if((((z+q)!=(s+l))+((z+l)<=(s+q))+((z+s)>=q))==0)
					break;
				s++;
			}
			 if((((z+q)!=(s+l))+((z+l)<=(s+q))+((z+s)>=q))==0)
				break;
			q++;
		}
		 if((((z+q)!=(s+l))+((z+l)<=(s+q))+((z+s)>=q))==0)
			break;
        z++;
	}
	z=z*10;
	s=s*10;
	l=l*10;
	q=q*10;
char a[5];
a[0]='z';a[1]='q';a[2]='s';a[3]='l';
int b[5],i=0,j=1;
b[0]=z;b[1]=q;b[2]=s;b[3]=l;
while(i<3)
{
	while(j<4)
	{
	if(b[i]>b[j])
	{
		b[4]=b[i],a[4]=a[i];
		b[i]=b[j],a[i]=a[j];
		b[j]=b[4],a[j]=a[4];
	}
	j++;
	}
	i++;
	j=i+1;
}
i=3;
		while(i>=0)
		{
cout<<a[i]<<" "<<b[i]<<"\n"<<endl;
i--;
		}
		return 0;
}