semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	char h1, h2, h3, h4;
	int zhao, qian, sun, li, a, b, c, m1, m2, m3, m4;
	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 ++ )
				{
					zhao = z * 10;
					qian = q * 10;
					sun = s * 10;
					li = l * 10;
					a = ( zhao + qian ) == ( sun + li );
					b = ( zhao + li ) > ( sun + qian );
					c = ( zhao + sun ) < qian;
					if ( a == 1 && b == 1 && c == 1 )
					{
						if ( li > qian )
						{
							h1 = 'l';
							h2 = 'q';
							m1 = li; m2 = qian;
							if ( zhao > sun )
							{
								h3 = 'z'; h4 = 's';
								m3 = zhao; m4 = sun;
							}
							else
							{
								h3 = 's'; h4 = 'z';
								m3 = sun; m4 = zhao;
							}
						}
						else
						{
							h1 = 'q';
							m1 = qian;
							if ( ( zhao > sun ) && ( zhao > li ) )
							{
								h2 = 'z'; m2 = zhao;
								if ( sun > li )
								{
									h3 = 's';
									h4 = 'l';
									m3 = sun; m4 = li;
								}
								else
								{
									h3 = 'l'; h4 = 's';
									m3 = li; m4 = sun;
								}
							}
							if ( ( sun > zhao ) && ( sun > li ) )
							{
								h2 = 's'; m2 = sun;
								if ( zhao > li )
								{
									h3 = 'z'; h4 = 'l';
									m3 = zhao; m4 = li;
								}
								else
								{
									h3 = 'l'; h4 = 'z';
									m3 = li; m4 = zhao;
								}
							}
							if ( ( li > zhao ) && ( li > sun ) )
							{
								h2 = 'l'; m2 = li;
								if ( zhao > sun )
								{
									h3 = 'z'; h4 = 's';
									m3 = zhao; m4 = sun;
								}
								else
								{
									h3 = 's'; h4 = 'z';
									m3 = sun; m4 = zhao;
								}
							}
						}
						cout << h1 << " " << m1 << endl;
						cout << h2 << " " << m2 << endl;
						cout << h3 << " " << m3 << endl;
						cout << h4 << " " << m4 << endl;
					}
				}
}
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) && (z!=q) && (z!=s) && (z!=l) && (q!=s) && (q!=l) && (s!=l) )
					{
						if(l>q&&l>z&&l>s&&q>s&&q>z&&z>s)
						{
						cout << "l " << l*10 <<endl;
						cout << "q " << q*10 <<endl;
						cout << "z " << z*10 <<endl;
						cout << "s " << s*10 <<endl;
						}
						if(l>q&&l>s&&l>z&&q>s&&q>z&&s>z)
							{
						cout << "l " << l*10 <<endl;
						cout << "q " << q*10 <<endl;
						cout << "s " << s*10 <<endl;
						cout << "z " << z*10 <<endl;
						}
						if(q>l&&q>s&&q>z&&l>s&&l>z&&s>s)
							{
						cout << "q " << q*10 <<endl;
						cout << "l " << l*10 <<endl;
						cout << "s " << s*10 <<endl;
						cout << "z " << z*10 <<endl;
						}
						if(q>l&&q>z&&q>s&&l>z&&l>s&&z>s)
							{
						cout << "q " << q*10 <<endl;
						cout << "l " << l*10 <<endl;
						cout << "z " << z*10 <<endl;
						cout << "s " << s*10 <<endl;
						}

					}
				}
return 0;
}
int main()
{
	char weight[6];
	int z,q,s,l;
	int i,j,k,p,m;
	for(i=1;i<=5;i++)
	{
		z=i;
		weight[i]='z';
		for(j=1;j<=5;j++)
		{
			if(i==j)
			{
				continue;
			}
			q=j;
			weight[j]='q';
			for(k=1;k<=5;k++)
			{
				if(k==i || k==j)
				{
					continue;
				}
				s=k;
				weight[k]='s';
				for(p=1;p<=5;p++)
				{
					if(p==i || p==j || p==k)
					{
						continue;
					}
					l=p;
					weight[p]='l';
					if(z+q==s+l && z+l>s+q && z+s<q)
					{
						for(m=5;m>=1;m--)
						{
							if(z!=m && q!=m && s!=m && l!=m)
							{
								continue;
							}
							cout<<weight[m]<<' '<<m*10<<endl;
						}
					}
				}
			}
		}
	}
	return 0;
}
int main(){
	int z,q,s,l;       //??????????
	int a[5];          //???????????
	int i,j,m;         //??????i,j?????m
	char b[6];         //???????????
	for(z=1;z<=5;z++){ //???????????1-5??10-50
		for(q=1;q<=5;q++){
			if(z==q)   //??????????????
				continue;
			else {
				for(s=1;s<=5;s++){
					if((s==z)||(s==q))
						continue;
					else {
						for(l=1;l<=5;l++){
							if((l==z)||(l==q)||(l==s))
								continue;
							else if(((z+q)==(s+l))&&((z+l)>(q+s))&&((z+s)<q)){  //????????
								a[1]=z;a[2]=q;a[3]=s;a[4]=l;                    //?????
								b[a[1]]='z';b[a[2]]='q';b[a[3]]='s';b[a[4]]='l';//?????????
								for(i=1;i<=4;i++){                              //???????
									for(j=1;j<=4-i;j++){
										if(a[j]<a[j+1]){
										m=a[j];
										a[j]=a[j+1];
										a[j+1]=m;
										}
									}
								}
								for(i=1;i<=4;i++){                               //???????????
 									cout<<b[a[i]]<<" "<<a[i]*10;
									if(i!=4)
										cout<<endl;
								}
							}

						}
					}
				}
			}
		}
	}
	return 0;           //????
}
int main()
{
	int Z, Q, S, L, z, q, s, l, k;
	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) && ((Z - Q) * (Z - S) * (Z - L) * (Q - S) * (Q - L) * (S - L) != 0))
		{
			z = Z;
			q = Q;
			s = S;
			l = L;
			break;
		}
	}
	k = 1;
	while (k <= 4)
	{
		k = k + 1;
		if (z > q && z > s && z > l)
		{
			cout << "z " << 10 * z << endl;
			z = 0;
			continue;
		}
		if (q > z && q > s && q > l)
		{
			cout << "q " << 10 * q << endl;
			q = 0;
			continue;
		}
		if (s > z && s > q && s > l)
		{
			cout << "s " << 10 * s << endl;
			S = 0;
			continue;
		}
		if (l > z && l > q && l > s)
		{
			cout << "l " << 10 * l << endl;
			l = 0;
			continue;
		}
	}
	return 0;
}
int main()
{int z,q,s,l;
 int a[4],t,i,j;
 char b[4]={'z','q','s','l'},c;
 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[0]=z,a[1]=q,a[2]=s,a[3]=l;
 for(i=0;i<3;i++)
  for(j=i+1;j<4;j++)
  if(a[i]<a[j])
  {t=a[i],a[i]=a[j],a[j]=t,c=b[i],b[i]=b[j],b[j]=c;}
 for(i=0;i<4;i++)
 printf("%c %d\n",b[i],a[i]);
}
//???
int main()
{
	int wz=0,wq=0,ws=0,wl=0,a=0,i=0;
	char b[6]={'0'};
	for(wz=1;wz<=5;wz=wz+1)
	{
		for(wq=1;wq<=5;wq=wq+1)
		{
			if(wq==wz)
				continue;
			for(ws=1;ws<=5;ws=ws+1)
			{
				if(ws==wz || ws==wq)
					continue;
				for(wl=1;wl<=5;wl=wl+1)
				{
					if(wl==wz || wl==wq || wl==ws)
						continue;
					a=(wz+wq==ws+wl)+(wz+wl>ws+wq)+(wz+ws<wq);
					if(a==3)
					{
						b[wz]='z';
						b[wq]='q';
						b[ws]='s';
						b[wl]='l';
					}
					
				}
			}
		}
	}
	for(i=5;i>0;i--)
	{
		if(b[i]==0)
           continue;
		cout<<b[i]<<" "<<i*10<<endl;
	}
	return 0;
}
struct weight
{
    char name;
    int weight;
};
int main()
{
    int a,b,c,d,i,j,t1;
    char t2;
    struct weight f[4];
    for(a=1;a<=5;a++)
        for(b=1;b<=5;b++)
            for(c=1;c<=5;c++)
                for(d=1;d<=5;d++)
                {
                    if((a!=b) && (b!=c) && (c!=d) && (d!=a))
                        if((a+b)==(c+d))
                            if((a+d)>(c+b))
                                if((a+c)<b)
                                {
                                    f[0].name='z';
                                    f[0].weight=a;
                                    f[1].name='q';
                                    f[1].weight=b;
                                    f[2].name='s';
                                    f[2].weight=c;
                                    f[3].name='l';
                                    f[3].weight=d;
                                    for(i=0;i<4;i++)
                                        for(j=i+1;j<4;j++)
                                            if(f[j].weight>f[i].weight)
                                            {
                                                t1=f[j].weight;
                                                t2=f[j].name;
                                                f[j].weight=f[i].weight;
                                                f[j].name=f[i].name;
                                                f[i].weight=t1;
                                                f[i].name=t2;
                                            }
                                    for(i=0;i<4;i++)
                                        printf("%c %d\n",f[i].name,10*f[i].weight);
                                }
                }
    return 0;
}
int main()
{
	int z,q,s,l,x1,x2,x3,i;
	char rank[6];
	for (i=0;i<6;i++)
		rank[i]='0';
	for (z=10;z<=50;z=z+10)
	{
		for (q=10;q<=50;q=q+10)
		{
			if (q==z) continue;
			for (s=10;s<=50;s=s+10)
			{
				if (s==z || s==q) continue;
				for (l=10;l<=50;l=l+10)
				{
					if (l==z || l==q || l==s) continue;
					x1=((z+q)==(s+l));
					x2=((z+l)>(s+q));
					x3=((z+s)<q);
					if (x1+x2+x3==3)
					{
						rank[z/10]='z';
						rank[q/10]='q';
						rank[s/10]='s';
						rank[l/10]='l';
						for (i=5;i>=1;i--)
						{
							if(rank[i]!='0')
							{
								cout <<rank[i]<<' '<<i*10<<endl;
							}
						}
					}
				}
			}
		}
	}
	return 0;
}
/*
 * 1.cpp
 *
 *  Created on: 2013-10-11
 *      Author: ??
 */

int main(){
          int a[4],i,j,t;
          char b[4]={'z','q','s','l'},k;
          for(a[0]=10;a[0]<=50;a[0]=a[0]+10)
          {
        	  for(a[1]=10;a[1]<=50;a[1]=a[1]+10)
        	  {
        		  if(a[1]==a[0]) continue;
        		  for(a[2]=10;a[2]<=50;a[2]=a[2]+10)
        		  {
        			  if(a[2]==a[0]||a[2]==a[1]) continue;
        			  for(a[3]=10;a[3]<=50;a[3]=a[3]+10)
        			  {
        				  if(a[3]==a[0]||a[3]==a[1]||a[3]==a[2]) continue;
        				  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=1;j<4-i;j++)
        						  {
        							  if(a[i]<a[i+j])
        						      {
        							       t=a[i+j];
        							       a[i+j]=a[i];
        							       a[i]=t;
        							       k=b[i+j];
        							       b[i+j]=b[i];
        							       b[i]=k;
        						      }
        						  }
        					  }
        				  for(i=0;i<4;i++)  cout<<b[i]<<" "<<a[i]<<endl;
        				  break;
        				  }
        			  }
        		  }
        	  }
          }
	      return 0;
}
int main()
{
	 int a,b,c,d=0;//??????a,b,c,d
	 for (a=1;a<=5;a++)//?a<=5??????????????a+1
		 for(b=1;b<=5;b++)//?b<=5?????????????b+1
			 for(c=1;c<=5;c++)//?c<=5?????????????c+1
				 for(d=1;d<=5;d++)//?d<=5?????????????d+1
					 if(a+b==c+d && a+d>b+c &&a+c<b)//??????????????????
					 {
						 for(int i=1;i<=4;i++)//??????
						 {
							 int max=0,p=0;//?????????max???0
							 if (a>b){max=a;p=1;}
							 else {max=b;p=2;}
							 if (c>max){max=c;p=3;}
							 if (d>max){max=d;p=4;}//?????????
							 switch (p)
							 {
							 case 1: {cout<<"z "<<max*10<<endl;a=0;break;}
							 case 2: {cout<<"q "<<max*10<<endl;b=0;break;}
							 case 3: {cout<<"s "<<max*10<<endl;c=0;break;}
							 case 4: {cout<<"l "<<max*10<<endl;d=0;break;}
							 }
						 }
						 return 0;
					 }
	return 0;
}
void main()
{
	int a[4]={0},h,i,j,k,t,max=0;
	char b[4]={'z','q','s','l'},x;
	
	for(h=1;h<6;h++)
	{
		for(i=1;i<6;i++)
		{
			for(j=1;j<6;j++)
			{
				for(k=1;k<6;k++)
				{
					if((h+i==j+k)&&(h+k>j+i)&&(h+j<i)&&(h!=i)&&(h!=j)&&(h!=k)&&(i!=j)&&(i!=k)&&(j!=k))
					{
						a[0]=h;a[1]=i;a[2]=j;a[3]=k;
					}
				}
			}
		}
	}

	for(h=0;h<4;h++)
	{
		for(i=0;i<3;i++)
		{
			if(a[i]<a[i+1])
			{
				t=a[i];
				a[i]=a[i+1];
				a[i+1]=t;
				x=b[i];
				b[i]=b[i+1];
				b[i+1]=x;
			}
		}
	}
	for(i=0;i<4;i++)
	{
		printf("%c %d\n",b[i],a[i]*10);
	}
}
/*
 * c.cpp
 *
 *  Created on: 2010-11-20
 *      Author: jsgl
 */

int main(){
   int z,q,s,l,i,j,m;//????????
   char a[6];  //???????????
   for(z=1;z<=5;z++){ //?4?????
	   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))//?????
					   {a[z]='z';//???????????
				       a[q]='q';
				       a[s]='s';
				       a[l]='l';

				       for(i=0;i<=5;i++)
	          if((i!=z)&&(i!=q)&&(i!=s)&&(i!=l)) m=i;

                 for(j=5;j>=1;j--){//??????
	             if(j==m) continue;
	             cout<<a[j]<<" "<<j*10<<endl;
                         }

				       }
			   }
		   }

	   }
   }

return 0;
}
int main ()         //????
{
	int a,b,c,d;
	char name[5]={'z','q','s','l'};
	for ( a=10; a<=50; a++ )
		for ( b=10; b<=50; b++ )
		{
			if ( a==b ) continue;
			for ( c=10; c<=50; c++ )
			{
				if ( a==c||b==c ) continue;
				for ( d=10; d<=50; d++ )
				{
					if ( a==d||b==d||c==d )continue;
				if ( a+b==c+d && a+d>b+c && a+c<b &&
						a%10==0 &&b%10==0&&c%10==0 &&d%10==0 )
				{
					if ( a>b&&b>c&&c>d )
					{
						cout<<"z"<<' '<<a<<endl;
						cout<<"q"<<' '<<b<<endl;
						cout<<"s"<<' '<<c<<endl;
						cout<<"l"<<' '<<d<<endl;
					}
					else if ( a>b&&b>d&&d>c )
					{
						cout<<"z"<<' '<<a<<endl;
						cout<<"q"<<' '<<b<<endl;
						cout<<"s"<<' '<<d<<endl;
						cout<<"l"<<' '<<c<<endl;
					}
					else if ( a>c&&c>d&&d>b )
					{
						cout<<"z"<<' '<<a<<endl;
						cout<<"q"<<' '<<c<<endl;
						cout<<"s"<<' '<<d<<endl;
						cout<<"l"<<' '<<b<<endl;
				    }
					else if ( d>b&&b>a&&a>c )
					{
						cout<<"l"<<' '<<d<<endl;
						cout<<"q"<<' '<<b<<endl;
						cout<<"z"<<' '<<a<<endl;
						cout<<"s"<<' '<<c<<endl;
					 }

				}
				}
			}

		}

	return 0;            //???????????
}                         //????
//****************
//*???        *
//*1000010538    *
//***************
int main()                                                       //???
{
	int z,q,s,l,i,sum=0;                                         //???????
	char rank[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(s==z||s==q)  continue;
			     for(l=1;l<=5;l++)
				 {if(l==s||l==z||l==q)  continue;
				     sum=(z+q==s+l)+(z+l>=s+q)+(z+s<q);           //??????????
			if(sum==3)                                   //?????????
			{   
				rank[z]='z';                             //??????
				rank[q]='q';
				rank[s]='s';
				rank[l]='l';
				for(i=5;i>=0;i--)                        //??????
					 {
						 if(rank[i]!=0)
					cout<<rank[i]<<" "<<i*10<<endl;
					 }
					 }
				 }
			}
		}
	}
		return 0;
}                                                                  //??
/*
 * exam.cpp
 *
 *  Created on: 2010-11-20
 *      Author: jsgl
 *      ???
 */

int main() {
	int z, q, s, l;
	char a[5];

	//??????????
	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 (s == z || s == q)
					continue;
				for (l = 10; l <= 50; l = l + 10) {
					if (l == z || l == q || l == s)
						continue;
					if (z + q == s + l && z + l > s + q && z + s < q) {
						//????????
						a[z / 10] = 'z';
						a[q / 10] = 'q';
						a[s / 10] = 's';
						a[l / 10] = 'l';
						for (int i = 5; i >= 1; i--)
							if (a[i] == 'z' || a[i] == 'q' || a[i] == 's'
									|| a[i] == 'l')//?????????????
								cout << a[i] << " " << i * 10 << endl;
					}
				}
			}
		}
	return 0;
}
int main()
{
	int a , b , c , d ;
	int A ,B ;
	for(a=10 ;a<=40; a+=10)
		for(b=40 ; b<=50 ; b+=10)
			for(c=10 ; c<=40 ; c+=10)
			{
				d=a+b-c ;
				A= (a+d)>(b+c) ;
				B= (a+c)<b ;
				if (A+B==2 && a!=b && a!=c && b!=c && d<=50)
				{
					if(b<d)
					{
						if(a<c)
						{
					cout<<"l "<<d<<endl;
				    cout<<"q "<<b<<endl;
					cout<<"s "<<c<<endl;
					cout<<"z "<<a<<endl;
						}
						else
						{
					cout<<"l "<<d<<endl;
				    cout<<"q "<<b<<endl;
					cout<<"z "<<a<<endl;
					cout<<"s "<<c<<endl;
						}
					}
					else
					{
						if(a<c&&c<d)
						{
					cout<<"q "<<b<<endl;
				    cout<<"l "<<d<<endl;
					cout<<"s "<<c<<endl;
					cout<<"z "<<a<<endl;
						}
						if(a<d&&d<c)
						{
					cout<<"q "<<b<<endl;
				    cout<<"s "<<c<<endl;
					cout<<"l "<<d<<endl;
					cout<<"z "<<a<<endl;
						}
						if(c<a&&a<d)
						{
					cout<<"q "<<b<<endl;
				    cout<<"l "<<d<<endl;
					cout<<"z "<<a<<endl;
					cout<<"s "<<c<<endl;
						}
						if(c<d&&d<a)
						{
					cout<<"q "<<b<<endl;
				    cout<<"z "<<a<<endl;
					cout<<"l "<<d<<endl;
					cout<<"s "<<c<<endl;
						}
				    

				
					}
			}
			}




   return 0 ;
}
int a[6];
char b[5]={' ','z','q','s','l'};
int main()
{
   int i,j;
  
  for(a[1]=1;a[1]<=5;a[1]++)
      for(a[2]=1;a[2]<=5;a[2]++)
         for(a[3]=1;a[3]<=5;a[3]++)
            for(a[4]=1;a[4]<=5;a[4]++)
        if(a[1]!=a[2]&&a[1]!=a[3]&&a[1]!=a[4])
           if(a[2]!=a[3]&&a[2]!=a[4]&&a[3]!=a[4])
             if(a[1]+a[2]==a[3]+a[4])
               if(a[1]+a[4]>a[2]+a[3])
                  if(a[1]+a[3]<a[2])
                    {
                       for(i=1;i<=4;i++)
                          for(j=1;j<=4;j++)
                             if(a[i]>a[j])
                              {
                                a[i]=a[i]+a[j];
                                a[j]=a[i]-a[j];
                                a[i]=a[i]-a[j];  
                                b[i]=b[i]+b[j];
                                b[j]=b[i]-b[j];
                                b[i]=b[i]-b[j];  
                               }
                      for(i=1;i<=4;i++)
                        printf("%c %d\n",b[i],a[i]*10);
                        return 0;
                     }
return 0;
}
int main() {
	int z=10,q=10,s=10,l=10,a;
	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))break;}
				if((z+q==s+l)&&(z+l>s+q)&&(z+s<q))break;}
			if((z+q==s+l)&&(z+l>s+q)&&(z+s<q))break;}	
		if((z+q==s+l)&&(z+l>s+q)&&(z+s<q))break;}		//???????????????????????
	for(a=50;a>=10;a=a-10){
		if(z==a)cout<<"z "<<a<<endl;
		if(q==a)cout<<"q "<<a<<endl;
		if(s==a)cout<<"s "<<a<<endl;
		if(l==a)cout<<"l "<<a<<endl;}					//???????
	return 0;
}
//============================================================================
// Name        : shj.cpp
// Author      : ???
// time        : 2013.10.21
// Description :  ???
//============================================================================


int main()//???
{   //?????
   int z=50,q=50,s=50,l=50;
  for(z=50;z>=10;z=z-10)//???????z,q,s,l
  {
	  for(q=50;q>=10;q=q-10){
		  if(z==q)
			  continue;
		  for(s=50;s>=10;s=s-10){
			  if(s==z||s==q)
				  continue;
			  for(l=50;l>=10;l=l-10){
				  if(l==z||l==q||l==s)
					  continue;
				  if(((z+q)==(s+l))&&((z+l)>(q+s))&&((z+s)<q))
				  {
					 for(int i=50;i>=10;i=i-10)//???????
						 if(z==i)
							 cout<<"z "<<z<<endl;
						 else if(q==i)
							 cout<<"q "<<q<<endl;
						 else if(s==i)
							 cout<<"s "<<s<<endl;
						 else if(l==i)
							 cout<<"l "<<l<<endl;

				  }

			  }
		  }
	  }
  }
   return 0;
}   //?????
void bdx(int,int,int,int);
int main() 
{
	for(int z=1;z<6;z++)
	{
		for(int q=1;q<6;q++)
		{
			for(int s=1;s<6;s++)
			{
				for(int l=1;l<6;l++)
				{
					if(z+q==s+l&&(z+l)>(s+q)&&(z+s)<q)
					{
						bdx(z,q,s,l);
					}
				}
			}
		}
	}

return 0;
}

void bdx(int z,int q,int s,int l)
{
	if(z>q)
	{
		cout<<"l "<<l*10<<endl
			<<"z "<<z*10<<endl
			<<"q "<<q*10<<endl
			<<"s "<<s*10<<endl;
	}
	else if(l>q&&q>z&&z>s)
	{
		cout<<"l "<<l*10<<endl
			<<"q "<<q*10<<endl
			<<"z "<<z*10<<endl
			<<"s "<<s*10<<endl;
	}
	else if(l>q&&q>s&&s>z)
	{
		cout<<"l "<<l*10<<endl
			<<"q "<<q*10<<endl
			<<"s "<<s*10<<endl
			<<"z "<<z*10<<endl;
	}
	else if(q>l&&z>s)
	{
		cout<<"q "<<l*10<<endl
			<<"l "<<q*10<<endl
			<<"z "<<z*10<<endl
			<<"s "<<s*10<<endl;
	}
	else if(q>l&&l>s&&s>z)
	{
		cout<<"q "<<q*10<<endl
			<<"l "<<l*10<<endl
			<<"s "<<s*10<<endl
			<<"z "<<z*10<<endl;
	}
	else if(s>l)
	{
		cout<<"q "<<q*10<<endl
			<<"s "<<s*10<<endl
			<<"l "<<l*10<<endl
			<<"z "<<z*10<<endl;
	}
}
int main ()
{
	int z, q, s, l; 
	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 += 10)
				{
					if ((l == s) || (l == q) || (l == z))
						continue; 
					if ((z + q == s + l) && (z + l > s + q) && (z + s < q))
					{
						if (l > q)
						{
							cout << "l " << l << endl;
							cout << "q " << q << endl;
							cout << "z " << z << endl;
							cout << "s " << s << endl;
						}
						else
						{
							cout << "q " << q << endl;
							cout << "l " << l << endl;
							if (z > s)
							{
								cout << "z " << z << endl;
								cout << "s " << s << endl;
							}
							else
							{
								cout << "s " << s << endl;
								cout << "z " << z << endl;
							}
						}
					}
				}
			}
		}
	}
	return 0; 
}
int main()
{
	int z,q,s,l;                                                      //????????????????
	int a[4],t;char c[4],u;                                           //a[4]??????c[4]??????t?u??????
    for(z=1;z<=5;z++)                     //????
		for(q=1;q<=5;q++)
			if(q!=z)
				for(s=1;s<=5;s++)
					if(s!=z&&s!=q)
						for(l=1;l<=5;l++)
							if(l!=z&&l!=q&&l!=s)
								if(z+q==s+l&&z+l>q+s&&z+s<q)//??????
								{a[0]=z;a[1]=q;a[2]=s;a[3]=l;//???????????????
								c[0]='z';c[1]='q';c[2]='s';c[3]='l';
								break;}
for(int i=0;i<4;i++)
for(int j=0;j<3-i;j++)
if(a[j]<a[j+1])                                     //??
{t=a[j];a[j]=a[j+1];a[j+1]=t;u=c[j];c[j]=c[j+1];c[j+1]=u;}
for(int k=0;k<4;k++)
cout<<c[k]<<" "<<a[k]*10<<endl;
return 0;
}
int main()
{
	int z,q,s,l,i;
	char rank[100];
	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))
					{
						rank[z]='z';
						rank[q]='q';
						rank[s]='s';
						rank[l]='l';
						for(i=50;i>=10;i=i-10)
						{if(i==z||i==q||i==s||i==l)
							cout<<rank[i]<<" "<<i<<endl;
						}
					}
				}
			}
		}
	}
	return 0;
}
int main()
{
	int i,j,m,n,z,q,s,l,a[4],x,y,t;
	for(i=1;i<=5;i++)
	{
		z=i*10;
		for(j=1;j<=5;j++)
		{
			q=j*10;
			for(m=1;m<=5;m++)
			{
				s=m*10;
				for(n=1;n<=5;n++)
				{
					l=n*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[0]=z;
						a[1]=q;
						a[2]=s;
						a[3]=l;
						for(x=1;x<=3;x++)
						{
							for(y=3;y>=x;y--)
							{
								if(a[y]>a[y-1])
								{
									t=a[y];
									a[y]=a[y-1];
									a[y-1]=t;
								}
							}
						}
						for(i=0;i<=3;i++)
						{
							if(i==0)
							{
								if(a[i]==z)
									printf("z %d",z);
								else if(a[i]==q)
									printf("q %d",q);
								else if(a[i]==s)
									printf("s %d",s);
								else
									printf("l %d",l);
							}
							else
							{
								if(a[i]==z)
									printf("\nz %d",z);
								else if(a[i]==q)
									printf("\nq %d",q);
								else if(a[i]==s)
									printf("\ns %d",s);
								else
									printf("\nl %d",l);	
							}
						}
					}
				}
			}
		}
	}
	return 0;
}
// ???.cpp : ??????????????
//



int main()
{
	int i,z,s;
	for(i=70;i>=30;i-=10)
	{
	   for(z=20;z<=30;z+=10)
	   {
	     for(s=10;s<z&&s<=20;s+=10)
		 {
		   if(z*2+s<i&&i-s<60)
		   {
printf("l %d\n",i-s);
printf("q %d\n",i-z);		    
printf("z %d\n",z);
printf("s %d\n",s);	 

			 			
 
		   }
		 }
	   }
	}
	return 0;
}
/*
 * 113.cpp
 *
 *  Created on: 2010-11-20
 *      Author: jsgl
 */
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)){
				cout<<'l'<<" "<<l<<endl;
				cout<<'q'<<" "<<q<<endl;
				cout<<'z'<<" "<<z<<endl;
				cout<<'s'<<" "<<s<<endl;
				}
			}
		}
	}
}
return 0;
}