semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
    int a[4],b[4];
    int z,q,s,l;
    int i,j,k,t;
    b[0]='z';b[1]='q';b[2]='s';b[3]='l';
    for(i=1;i<=5;i++)
    {z=i;
                     for(j=1;j<=5;j++)
                     {q=j;
                                      if(j==i) continue;
                                      else
                                      {
                                          for(k=1;k<=5;k++)
                                          {s=k;
                                                           if(k==j||k==i) continue;
                                                           else
                                                           {
                                                               l=z+q-s;
                                                               if((z+l>s+q)&&l<=5&&(l!=z)&&(l!=q)&&(l!=s))
                                                               {if(z+s<q)
                                                                {a[0]=z;a[1]=q;a[2]=s;a[3]=l;}
                                                               }
                                                           }
                                          }
                                      }
                     }
    }
    for(i=0;i<4;i++)
    {
                    for(j=1;j<4-i;j++)
                    if(a[j-1]<a[j])
                    {t=a[j-1];a[j-1]=a[j];a[j]=t;
                     t=b[j-1];b[j-1]=b[j];b[j]=t;                     
                     }
    }
    for(i=0;i<4;i++)
    printf("%c %d\n",b[i],10*a[i]);                                         
    getchar(); 
}
int main()
{
    int z,q,s,l,j;
    char rank[6];
    
    for(z=1;z<=5;z++)
    {
        for(q=1;q<=5;q++)
        {
            if(z!=q)
            {
                    for(s=1;s<=5;s++)
                    {
                        if(s!=z&&s!=q)
                        {
                            for(l=1;l<=5;l++)
                            {
                              if(l!=z&&l!=q&&l!=s)
                              {
                                memset(rank,0,sizeof(rank));
                                rank[z]='z';
                                rank[q]='q';
                                rank[s]='s';
                                rank[l]='l';
                                
                                if((z+q==s+l)&&(z+l>s+q)&&(z+s<q))
                                {
                                    
                                    for(j=5;j>=1;j--)
                                    {
                                                 if(rank[j]!=0)
                                                 {
                                                               cout<<rank[j]<<' '<<j*10<<endl;
                                                 }
                                    }
                                }
                                                
                              }
                            }         
                        }
                    }
            }
        }
    } 
  
    return 0;                 
}
/*
 * 3.cpp
 *
 *  Created on: 2010-11-20
 *      Author: jsgl
 */
int main(){
	int z,q,s,l,i;//z,q,s,l,??????????i?????
	char a[6];//????????
	memset(a,0,sizeof(a));//??
	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)//????????????????????????; ???????????????????????????????????????????????????????
						&&(z!=q)&&(z!=s)&&(z!=l)
						&&(q!=s)&&(q!=l&&(s!=l))){
						a[z/10]='z';
						a[q/10]='q';
						a[s/10]='s';
						a[l/10]='l';
						for(i=5;i>=1;i--)
						   if(a[i]!='\0')//??????????
							cout<<a[i]<<' '<<i*10<<endl;
						break;
					}
	return 0;
}
//********************************
//*??????   **
//*?????? 1200012837 **
//*???2012.10.11  **
//********************************

int main()
{
	int z, q, s, l;
	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)
					{
						int a[4]={z,q,s,l}, p = 0;
						char b[4]={'z','q','s','l'}, q;
						for(int j = 0; j < 3; j++)
						{
							for(int i = 0; i <= 2 - j; i++)
							{
								if(a[i] < a[i+1])
								{
									p = a[i];
									a[i] = a[i+1];
									a[i+1] = p;
									q = b[i];
									b[i] = b[i+1];
									b[i+1] = q;
								}
							}
						}
						for(int k = 0;k < 4; k++)
						{
							cout << b[k] << " " << a[k]*10 <<endl;
				 		}
					}
					
				}
			}
		}
	}

	return 0;
}
/*
 *  ???????
 *   ????? 2010-11-20
 *    ??????
 *    ??????????????????????????;
 *     ???????????????????????????????????????????
 */


int main(){
	int a[4];
	char b[4];
	for(int z=1;z<=5;z++)
		for(int q=1;q<=5;q++)
			for(int s=1;s<=5;s++)
				for(int l=1;l<=5;l++){//1?2?3?4?5??????????
					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))
						{a[0]=z;a[1]=q;a[2]=s;a[3]=l;
						b[0]='z';b[1]='q';b[2]='s';b[3]='l';
						for(int i=0;i<4;i++)
							for(int j=0;j<i;j++)
								if(a[i]>a[j])
								{int temp;
								temp=a[j];
								a[j]=a[i];
								a[i]=temp;
								char t;
								t=b[j];
								b[j]=b[i];
								b[i]=t;
								}
						cout<<b[0]<<" "<<a[0]*10<<endl;
				        cout<<b[1]<<" "<<a[1]*10<<endl;
						cout<<b[2]<<" "<<a[2]*10<<endl;
						cout<<b[3]<<" "<<a[3]*10<<endl;
                       		}
				}

	return 0;
}
int main(){
    int z,q,s,l;
    int a1;
    for(z=1;z<=5;z++){
     for(q=1;q<=5;q++){
     if(q==z)
     continue;
     for(s=1;s<=5;s++){
         if((s==q)||(s==z))
             continue;          
     for(l=1;l<=5;l++){
          if((l==q)||(l==z)||(l==s))
             continue;              
       a1=((z+q)==(s+l))+((z+l)>(s+q))+((z+s)<(q));
       if(a1==3){
       cout<<"l "<<l*10<<endl<<"q "<<q*10<<endl<<"z "<<z*10<<endl<<"s "<<s*10<<endl;
                }
                }
                }
                }
                }
                return 0;
                }
/*
 * Homework3.8Weight.cpp
 *
 *  Created on: 2013-10-19
 *      Author: JuiceHe
 */

int main()
{
	int z,q,s,l;
	char f='z',g='q',h='s',i='l',j,k;int a,b,c,d,m,n;

	for(z=10;z<=50;z=z+10)
	for(q=10;q<=50;q=q+10)
	for(s=10;s<=50;s=s+10)
	for(l=10;l<=50;l=l+10)
	 if((z+q==s+l)&&(z+l>s+q)&&(z+s<q)&&(z!=q)&&(z!=s)&&(z!=l)&&(q!=s)&&(q!=l)&&(s!=l))//????????

	{a=z;b=q;c=s;d=l;//?????????f?g?h?i?????a?b?c?d?????j?k??????m?n?????
	 if(b<a){f='q';g='z';m=a;a=b;b=m;}//??z?q????
	 if(c<b)//?s?????z?q????
	  {if(c<a){j=f;f='s';h=g;g=j;
	          m=a;a=c;c=b;b=m;}
	  else {j=g;g='s';h=j;m=b;b=c;c=m;}}
	 if(d<c)//?l?????z?q?s????
	  {if(d<a){j=f;f='l';k=g;g=j;j=h;h=k;i=j;
		 	   m=a;a=d;n=b;b=m;m=c;c=n;d=m;}
	  else if(d<b){j=g;g='l';i=h;h=j;m=b;b=d;d=c;c=m;}
	  else {j=h;h='l';i=j;m=c;c=d;d=m;}
	  }
	 break;}
		 	 cout<<i<<" "<<d<<endl<<h<<" "<<c<<endl<<g<<" "<<b<<endl<<f<<" "<<a<<endl;//???????????

	return 0;
}
int main()
{
    char sn[4]={'z','q','s','l'};                                               //??sn[4]????? 
    int wt[4],rk[4],w=0;
    //??w???????????????wt[4]??????1/10???rk[4]????????rk[n]?????wt[i]?sn[i]?????????????????? 
    for(int i=0;i<4;i++)rk[i]=i;                                                //??rk[4]??????wt[n]?sn[n]????? 
    for(wt[0]=1;wt[0]<=5;wt[0]++)                                               //???A??wt[0]?wt[3]?????? 
    {
        for(wt[1]=1;wt[1]<=5;wt[1]++)
        {
            for(wt[2]=1;wt[2]<=5;wt[2]++)
            {
                for(wt[3]=1;wt[3]<=5;wt[3]++)
                {
                    if(wt[0]+wt[1]==wt[2]+wt[3]&&wt[0]+wt[3]>wt[1]+wt[2]&&wt[0]+wt[2]<wt[1])
                    {
                        int t;
                        w=1;
                        for(int i=0;i<4;i++)                                    //???B????sn[4]?wt[4]?????????????????? 
                        {
                            for(int j=i;j<4;j++)
                            {
                                if(wt[rk[i]]<wt[rk[j]])
                                {
                                    t=rk[i];
                                    rk[i]=rk[j];
                                    rk[j]=t;
                                }
                            }
                        }                                                       //???B?? 
                        break;
                    }
                }
                if(w==1)break;                                                  //????w=1?????????????????????goto??? 
            }
            if(w==1)break;
        }
        if(w==1)break;
    }                                                                           //???A?? 
    for(int i=0;i<4;i++)cout<<sn[rk[i]]<<' '<<10*wt[rk[i]]<<endl;
    return 0;
}
int main ()
{
	int z,q,s,l ;
	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)
						{
							if(z==5)cout<<"z "<<10*z<<endl;
							if(q==5)cout<<"q "<<10*q<<endl;
							if(s==5)cout<<"s "<<10*s<<endl;
							if(l==5)cout<<"l "<<10*l<<endl;
							if(z==4)cout<<"z "<<10*z<<endl;
							if(q==4)cout<<"q "<<10*q<<endl;
							if(s==4)cout<<"s "<<10*s<<endl;
							if(l==4)cout<<"l "<<10*l<<endl;
							if(z==3)cout<<"z "<<10*z<<endl;
							if(q==3)cout<<"q "<<10*q<<endl;
							if(s==3)cout<<"s "<<10*s<<endl;
							if(l==3)cout<<"l "<<10*l<<endl;
							if(z==2)cout<<"z "<<10*z<<endl;
							if(q==2)cout<<"q "<<10*q<<endl;
							if(s==2)cout<<"s "<<10*s<<endl;
							if(l==2)cout<<"l "<<10*l<<endl;
							if(z==1)cout<<"z "<<10*z<<endl;
							if(q==1)cout<<"q "<<10*q<<endl;
							if(s==1)cout<<"s "<<10*s<<endl;
							if(l==1)cout<<"l "<<10*l<<endl;
						}
				}


	return 0;
}
//
//  main.cpp
//  ???
//
//  Created by Neptune on 12-10-9.
//  Copyright (c) 2012? ??? 1200012777. All rights reserved.
//

int main()
{
    int a, b , c, d;
    for (a = 10; a <= 50; a += 10)
    {
        for (b = 10; b <= 50; b += 10)
        {
            if (a == b)
            {
                continue;
            }
            for (c = 10; c <= 50; c += 10)
            {
                if (a == c || b == c)
                {
                    continue;
                }
                for (d = 10; d <= 50; d += 10)
                {
                    if (a == d || b == d || c == d)
                    {
                        continue;
                    }
                    else if ((a + b == c + d) + (a + d > b + c) + (a + c < b ) == 3)
                    {
                        break;
                    }
                }
                if ((a + b == c + d) + (a + d > b + c) + (a + c < b ) == 3)
                    break;
            }
            if ((a + b == c + d) + (a + d > b + c) + (a + c < b ) == 3)  break;
        }
        if ((a + b == c + d) + (a + d > b + c) + (a + c < b ) == 3)
            break;
    }
    int weight[4];
    char name[4];
    weight[0] = a;
    weight[1] = b;
    weight[2] = c;
    weight[3] = d;
    name[0] = 'z';
    name[1] = 'q';
    name[2] = 's';
    name[3] = 'l';
    for (int i = 0; i < 3; i++)
    {
        for (int j = i + 1; j < 4; j++)
        {
            if (weight[j] > weight[i])
            {
                int weight_t = weight[j];
                weight[j] = weight[i];
                weight[i] = weight_t;
                int name_t = name[j];
                name[j] = name[i];
                name[i] = name_t;
            }
                
        }
    }
        
    for(int i = 0; i <= 3; i++)
    {
        cout << name[i] << " " << weight[i] << endl;
    }
    return 0;
}
int main (){
	int i=0,j=0,k=0;
	char name[4]={'z','q','s','l'};
	int mz=1,mq=1,ms=1,ml=1;//?????????????????????????????????
	int m[4]={1,1,1,1};
	for(mz=1;mz<=5;++mz)
		for(mq=1;mq<=5;++mq)
			for(ms=1;ms<=5;++ms)
				for(ml=1;ml<=5;++ml)
				{
					if((mz+mq==ms+ml)&&(mz+ml>ms+mq)&&(mz+ms<mq))
					{
						m[0]=mz;m[1]=mq;m[2]=ms;m[3]=ml;
						for(i=0;i<=2;i++)
							for(j=3;j>=i+1;j--)
							{
								if(m[j]>m[j-1])
								{
									k=m[j];m[j]=m[j-1];m[j-1]=k;
									k=name[j];name[j]=name[j-1];name[j-1]=k;
								}
							}
					}

						//cout<<"l "<<ml*10<<endl<<"q "<<mq*10<<endl<<"z "<<mz*10<<endl<<"s "<<ms*10<<endl;
				}
    for(k=0;k<=3;k++)
    	cout<<name[k]<<" "<<m[k]*10<<endl;
	return 0;
}
int main()
{
int z,q,s,l;
int z1,q1,s1,l1;
for(z=1;z<=5;z++)
 for(q=1;q<=5;q++)  {if(z==q)continue;else
  for(s=1;s<=5;s++)  {if(z==s||q==s)continue;else
   for(l=1;l<=5;l++)  {if(z==l||q==l||s==l)continue;else
	   if((z+q==s+l)+(z+l>s+q)+(z+s<q)==3){z1=z;q1=q;s1=s;l1=l;break;}
}}}
z=z1;q=q1;s=s1;l=l1;
int m[4]={z,q,s,l};
char n[4]={'z','q','s','l'};
int i=0,j=0;
int zzz=z;char zzzz='z';
for(i=0;i<=2;i++)
 for(j=0;j<=2-i;j++)
	 if(m[j]<m[j+1]){zzz=m[j];m[j]=m[j+1];m[j+1]=zzz;zzzz=n[j];n[j]=n[j+1];n[j+1]=zzzz;}
for(i=0;i<=3;i++)
cout<<n[i]<<" "<<m[i]*10<<endl;

return 0;
}
int main()
{
	int z=1,i;
	int q=1;
	int s=1;
	int l=1;
	int a[6]={0};
	char b[6];
	for (z=1;z<=5;z++)
	{
		for (q=1;q<=5;q++)
		{
			if (z==q) continue;
			for (s=1;s<=5;s++)
			{
				if(s==q||s==z)continue;
				for (l=1;l<=5;l++)
				{
					if(l!=s&&l!=q&&l!=z)
					{
						if ((z+q)==(s+l)&&(z+l)>(s+q)&&(z+s)<q)
						{
						    a[z]=z*10;a[q]=q*10;a[s]=s*10;a[l]=l*10;
                            b[z]='z';b[q]='q';b[s]='s';b[l]='l';
                            for(i=5;i>0;i--)
                            {
                                if(a[i]!=0)
                                {
                                    cout<<b[i]<<" "<<a[i]<<endl;
                                }
                            }
						    	break;
						}
					}
				}
			}
		}
	}
return 0;
}
int main()
{
 int z=10,
     s=20,
     l=30,
     q=40,
     t;
     if(z+l<q+s)
      {t=z;
       z=s;
       s=t;
       t=l;
       l=q;
       q=t;}
     if(z+s>=q)
       {q=q+10;
        l=l+10;}
      if(z<s)
       {cout<<"q "<<q<<endl;
        cout<<"l "<<l<<endl;
        cout<<"s "<<s<<endl;
        cout<<"z "<<z<<endl;
}
       else
       {        cout<<"l "<<l<<endl;
                cout<<"q "<<q<<endl;
                cout<<"z "<<z<<endl;
                cout<<"s "<<s<<endl;

}
return 0;
}
int main()
{
	int a[4];
	char b[4];
	b[0]='z';b[1]='q';b[2]='s';b[3]='l';
	int i=0,j=0,p=0;
	char w;
	for(a[0]=1;a[0]<=5;a[0]++)
	{
		for(a[1]=1;a[1]<=5;a[1]++)
		{
			if(a[1]!=a[0])
			{
			    for(a[2]=1;a[2]<=5;a[2]++)
				{
				    if(a[2]!=a[0]&&a[2]!=a[1])
					{
  				       for(a[3]=1;a[3]<=5;a[3]++)
					   {
					        if(a[3]!=a[0]&&a[3]!=a[1]&&a[3]!=a[2])
							{
								if((a[0]+a[1]==a[2]+a[3])+(a[0]+a[3]>a[1]+a[2])+(a[0]+a[2]<a[1])==3)
								{
									for(j=1;j<=3;j++)
									{
										for(i=0;i<=3-j;i++)
										{
                                            if(a[i]<a[i+1])
											{ 
												p=a[i];w=b[i];
												a[i]=a[i+1];b[i]=b[i+1];
                                                a[i+1]=p;b[i+1]=w;
											}
										}

									}
									for(i=0;i<=3;i++)
									{
										cout<<b[i]<<" "<<10*a[i]<<endl;
									}
									break;
								}
							}
					   }
					} 
				}
			}
		}
	}	
	

	return 0;
}
int main()
{
	int z,q,s,l,cc[4],i;
	for(z=10;z<=50;z=z+10){
		for(q=10;q<=50;q=q+10){
			for(s=10;s<=50;s=s+10){
				for(l=10;l<=50;l=l+10){
					if(z!=q&&q!=s&&s!=l&&z!=s&&z!=l&&q!=l){
						cc[0]=(z+q==s+l);
						cc[1]=(z+l>s+q);
						cc[2]=(z+s<q);
						if(cc[0]+cc[1]+cc[2]==3){
							cout<<"l"<<" "<<l<<endl;
							cout<<"q"<<" "<<q<<endl;
							cout<<"z"<<" "<<z<<endl;
							cout<<"s"<<" "<<s<<endl;
						}
					}
				}
			}
		}
	}
	return 0;
}
int main()
{
	int z,q,s,l;
	for(z=10;z<=50;z=z+10)
		for(q=10;q<=50;q=q+10)
			for(s=10;s<=50;s=s+10)
				for(l=10;l<=50;l=l+10)
				{
					if(z+q==s+l&&z+l>s+q&&z+s<q&&z!=s&&z!=q&&z!=l&&s!=q&&s!=l&&q!=l)
					{
                     for(int i=50;i>=10;i=i-10)
					 {
						 if(z==i)
							 cout<<"z "<<i<<endl;
                         if(l==i)
							 cout<<"l "<<i<<endl;
						 if(s==i)
							 cout<<"s "<<i<<endl;
						 if(q==i)
							 cout<<"q "<<i<<endl;
					}
					}
				}
				return 0;
}
int main()
{
	int z,q,s,l;
	int lastz,lastq,lasts,lastl;
	int i;
	for(z=1;z<=5;z++)
	{
		for(q=1;q<=5;q++)
		{
			if(z==q){continue;}
			for(s=1;s<=5;s++)
			{
				if(s==z||s==q){continue;}
				for(l=1;l<=5;l++)
				{
					if(l==z||l==q||l==s){continue;}
					if((z+q==s+l)&&(z+l>s+q)&&(z+s<q))
					{
						lastz=z;
						lastq=q;
						lasts=s;
						lastl=l;
					}
				}
			}
		}
	}
	for(i=5;i>=1;i--)
	{
		if(lastz==i)
		{
			lastz=10*lastz;
			cout<<"z"<<" "<<lastz<<endl;
		}
		if(lastq==i)
		{
			lastq=10*lastq;
			cout<<"q"<<" "<<lastq<<endl;
		}
		if(lasts==i)
		{
			lasts=10*lasts;
			cout<<"s"<<" "<<lasts<<endl;
		}
		if(lastl==i)
		{
			lastl=10*lastl;
			cout<<"l"<<" "<<lastl<<endl;
		}
	}
	return 0;
}
int main()
{
	int weight[4],i,j,p;
	char name[4]={'z','q','s','l'};
	for(weight[0]=1;weight[0]<=5;weight[0]++)
		for(weight[1]=1;weight[1]<=5;weight[1]++)
			for(weight[2]=1;weight[2]<=5;weight[2]++)
			{
				weight[3]=weight[1]+weight[0]-weight[2];
				if((weight[0]+weight[3])>(weight[1]+weight[2])&&(weight[0]+weight[2])<weight[1])
				{
					for(i=1;i<4;i++)
						for(j=0;j<4-i;j++)
							if(weight[j]<weight[j+1])
							{
								p=weight[j];
								weight[j]=weight[j+1];
								weight[j+1]=p;
								p=name[j];
								name[j]=name[j+1];
								name[j+1]=p;
							}
					for(i=0;i<4;i++)
					{
						weight[i]*=10;
						cout<<name[i]<<" "<<weight[i]<<endl;
					}
				}

			}
	return 0;
}
void main()
{
	int z,q,s,l,a[5],j,i,t;
	char b[5];
	for(z=10;z<=50;z=z+10)
		for(q=10;q<=50;q=q+10)
			for(s=10;s<=50;s=s+10)
			   for(l=10;l<=50;l=l+10)
			   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)
                   {a[1]=z;a[2]=q;a[3]=l;a[4]=s;b[1]='z';b[2]='q';b[3]='l';b[4]='s';}
				    for(j=1;j<=3;j++)
                    for(i=1;i<=4-j;i++)
                    if(a[i]<a[i+1])
					{t=a[i]; a[i]=a[i+1]; a[i+1]=t;
					t=b[i]; b[i]=b[i+1]; b[i+1]=t;}
     for(i=1;i<=4;i++)
		 printf("%c %d\n",b[i],a[i]);
	
}
/*??????
  ??????1200012829
  ???2012.10.10*/
int main ()
{
	int z, q, s, l, x1, x2, x3;
	for ( z = 10; z <= 50; z = z + 10)
	{
		for ( q =10; q <= 50; q = q + 10 )
		{
			for ( s = 10; s <= 50; s = s + 10)
			{
				for ( l = 10; l <= 50; l = l + 10 )
				{
					x1 = ( z + q == s + l );
					x2 = ( z + l > s + q );
					x3 = ( z + s < q );
					if ( x1 + x2 + x3 == 3 )
					{
						cout << 'l' << ' ' << l << endl;
						cout << 'q' << ' ' << q << endl;
						cout << 'z' << ' ' << z << endl;
						cout << 's' << ' ' << s << endl;
					
					}
				}
			}
		}
	}
	return 0;
}
int main()//????????????????
{
    int z,q,s,l,i;//??? 
    char mark[51];//???? 
    for(i=0;i<=50;i++)mark[i]=0; //??? 
    for(z=10;z<=50;z+=10)//???? 
       for(q=10;q<=50;q+=10)
       {
                            if(q==z)continue;//?????????? 
                            for(s=10;s<=50;s+=10)
                            {
                                                  if(s==q||s==z)continue;
                                                  for(l=10;l<=50;l++)
                                                  {
                                                                     if(l==z||l==q||l==s)continue;
                                                                     if((z+q==s+l)&&(z+l>=s+q)&&(z+s<q))//???? 
                                                                     {
                                                                                                         mark[z]='z';
                                                                                                         mark[q]='q';
                                                                                                         mark[s]='s';
                                                                                                         mark[l]='l';
                                                                                                         for(i=50;i>=10;i=i-10)
                                                                                                         {
                                                                                                                               if(mark[i]!=0)
                                                                                                                               cout<<mark[i]<<' '<<i<<endl;//??????
                                                                                                         }
                                                                     }
                                                  }
                            }
       }
       getchar();getchar();
       return 0;
}
int main()
{
	int a[5]={10,20,30,40,50}, z, q  ,s, l, i, i2,  i3, i4;
	for(i=0; i < 5; i++)
	{
		z=a[i];
		for(i2=0; i2 < 5;i2++)
		{
			if(i2 == i)
			{
				continue;
			}
			else
			{
				q=a[i2];
				for(i3=0; i3 < 5; i3++)
				{
					if((i3 == i2) ||(i3==i))
					{
						continue;
					}
					else
					{
						s=a[i3];
						for(i4=0; i4 < 5; i4++)
						{
							if((i4 == i)||(i4 == i2)||(i4 == i3))
							{
								continue;
							}
							else
							{
								l=a[i4];
								if(( z+q == s+l) && (z+l > s+q) && (z+s < q))//lqzs
								{
									cout<<"l"<<" "<<l<<endl;
									cout<<"q"<<" "<<q<<endl;
									cout<<"z"<<" "<<z<<endl;
									cout<<"s"<<" "<<s<<endl;
								}
							}
						}
					}
				}
			}
		}
	}
return 0;
}
int main()
{
    int z,q,s,l;
    for(z=10;z<60;z=z+10)
    {
        for(q=10;q<60;q=q+10)
        {
            for(s=10;s<60;s=s+10)
            {
                for(l=10;l<60;l=l+10)
                {
                    if(z+q==s+l&&z+l>s+q&&z+s<q)    //?????????
                    {
                        if(l>q>s>z)
                            cout<<"l "<<l<<endl<<"q "<<q<<endl<<"s "<<s<<endl<<"z "<<z;
                        else if(q>l&&l>s&&s>z)
                            cout<<"q "<<q<<endl<<"l "<<l<<endl<<"s "<<s<<endl<<"z "<<z;
                        else if(q>l&&l>z&&z>s)
                            cout<<"q "<<q<<endl<<"l "<<l<<endl<<"z "<<z<<endl<<"s "<<s;
                        else if(l>q&&q>z&&z>s)
                            cout<<"l "<<l<<endl<<"q "<<q<<endl<<"z "<<z<<endl<<"s "<<s;
                        else if(q>z&&z>l&&l>s)
                            cout<<"q "<<q<<endl<<"z "<<z<<endl<<"l "<<l<<endl<<"s "<<s;
                        else if(q>s&&s>l&&l>z)
                            cout<<"q "<<q<<endl<<"s "<<s<<endl<<"l "<<l<<endl<<"z "<<z;
                        else if(q>z&&z>s&&s>l)
                            cout<<"q "<<q<<endl<<"z "<<z<<endl<<"s "<<s<<endl<<"l "<<l;
                        else if(q>s&&s>z&&z>l)
                            cout<<"q "<<q<<endl<<"s "<<s<<endl<<"z "<<z<<endl<<"l "<<l; //????
                    }
                }
            }
        }
    }
    return 0;
}