semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main() {
	int z,q,s,l;
		for(z=1;z<6;z++)
			for(q=1;q<6;q++)
				for(s=1;s<6;s++)
					for(l=1;l<6;l++)
					{
						if(z+q==s+l&z+l>s+q&z+s<q&z!=q!=s!=l)
						{
							if(l>q && 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 && q>s && s>z)
							{
								cout<<"l"<<" "<<l*10<<endl;
								cout<<"q"<<" "<<q*10<<endl;
								cout<<"s"<<" "<<s*10<<endl;
								cout<<"z"<<" "<<z*10<<endl;
							}
							if(l>s && s>q && q>z)
							{
							    cout<<"l"<<" "<<l*10<<endl;
								cout<<"s"<<" "<<s*10<<endl;
								cout<<"q"<<" "<<q*10<<endl;
								cout<<"z"<<" "<<z*10<<endl;
							}
							if(s>l && l>q && q>z)
					        {
							   cout<<"s"<<" "<<s*10<<endl;
							   cout<<"l"<<" "<<l*10<<endl;
							   cout<<"q"<<" "<<q*10<<endl;
							   cout<<"z"<<" "<<z*10<<endl;
							}
							if(q>l && l>s && s>z)
						   {
							cout<<"q"<<" "<<q*10<<endl;
							cout<<"l"<<" "<<l*10<<endl;
							cout<<"s"<<" "<<s*10<<endl;
							cout<<"z"<<" "<<z*10<<endl;
						   }
							if(z>l && l>s && s>q)
													   {
														cout<<"z"<<" "<<z*10<<endl;
														cout<<"l"<<" "<<l*10<<endl;
														cout<<"s"<<" "<<s*10<<endl;
														cout<<"q"<<" "<<q*10<<endl;
													   }
							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;
																				   }
							if(z>q && q>s && s>l)
																				   {
																					cout<<"z"<<" "<<z*10<<endl;
																					cout<<"q"<<" "<<q*10<<endl;
																					cout<<"s"<<" "<<s*10<<endl;
																					cout<<"l"<<" "<<l*10<<endl;
																				   }
						}
					}
	return 0;
}
int main()
{	
										
		int z, q, s, l;
		int condition[4], i;
		char rank[4]= {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==q || l==z) continue;
				
						condition[1]= (z+q)==(s+l);
						condition[2]= (z+l)>(s+q);
						condition[3]= (z+s)<q;
		
		

						if(condition[1]+condition[2]+condition[3]==3)
						{
							rank[z]='z';
							rank[q]='q';
							rank[s]='s';
							rank[l]='l';

						for(i=5; i>=1; i--)
						{
							if(rank[i]!=0)
							{	
								cout<<rank[i]<< " "<< i*10<<endl;
							}
						}


			}
			}

			}


		
			}
		
		}

			




return 0;

}
int main()
{   int sum=0;
    int z,q,s,l;
    int zw,qw,sw,lw; 
    for(z=1;z<=5;z++)
       for(q=1;q<=5;q++)
       {  if(q==z)   continue; 
          for(s=1;s<=5;s++)
          {  if(z==s||q==s)   continue; 
             for(l=1;l<=5;l++)
              {  if(l==z||l==q||l==s)   continue; 
                 sum=(z+q==s+l)+(z+l>s+q)+(z+s<q);
                 if(sum==3)
                 {        zw=z;qw=q;sw=s;lw=l;  }
    }}}
    if( qw>lw && zw>sw )  
    {  
        cout<<"q "<<qw*10<<endl<<"l "<<lw*10<<endl<<"z "<<zw*10<<endl<<"s "<<sw*10<<endl;  
    }  
    if( qw>lw && sw>zw )    
    {  
       cout<<"q "<<qw*10<<endl<<"l "<<lw*10<<endl<<"s "<<sw*10<<endl<<"z "<<zw*10<<endl;  
    }  
    if( lw>qw && sw>zw )  
    {  
         cout<<"l "<<lw*10<<endl<<"q "<<qw*10<<endl<<"s "<<sw*10<<endl<<"z "<<zw*10<<endl;   
    }  
    if( lw>qw && zw>sw ) 
    {  
         cout<<"l "<<lw*10<<endl<<"q "<<qw*10<<endl<<"z "<<zw*10<<endl<<"s "<<sw*10<<endl;   
    }   
       return 0;
}
int main()
{
	int z,q,s,l,w;
	for(z=1;z<=5;z++)
		for(q=1;q<=5;q++)
			for(s=1;s<=5;s++)
				for(l=1;l<=5;l++)
				{
					w=15-z-q-s-l;
					if(z*q*s*l*w==120)
					{
						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 z,q,s,l,a,b,c,d;
 char m[4],n[8];
 n[0]='z';
 n[1]='q';
 n[2]='s';
 n[3]='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)
      {
       a=z;
       b=q;
       c=s;
       d=l;
       }
      }
     }
    }  
   }
if(a>b) 
 {
  m[0]=a;
  n[4]=n[0];
  m[1]=b;
  n[5]=n[1];
  }
else
{
  m[0]=b;
  n[4]=n[1];
  m[1]=a;
  n[5]=n[0];
  }
if(m[0]<c)
 {
  n[6]=n[5];
  n[5]=n[4]; 
  n[4]=n[2];
  m[2]=m[1];
  m[1]=m[0];
  m[0]=c;
  }
else
 { 
  if(m[1]<c)
  {
   n[6]=n[5];
   n[5]=n[2]; 
   m[2]=m[1];
   m[1]=c;
   }
  else
  {
   n[6]=n[2]; 
   m[2]=c;
   }
  }
if(m[0]<d)
 {
  n[7]=n[6];
  n[6]=n[5];
  n[5]=n[4]; 
  n[4]=n[3];
  m[3]=m[2];
  m[2]=m[1];
  m[1]=m[0];
  m[0]=d;
  }
else
 { 
  if(m[1]<d)
  {
   n[7]=n[6];
   n[6]=n[5];
   n[5]=n[3]; 
   m[3]=m[2];
   m[2]=m[1];
   m[1]=d;
   }
  else
   {
   if(m[2]<d)
    {
     n[7]=n[6];
     n[6]=n[3]; 
     m[3]=m[2];
     m[2]=d;
    }
    else
    {
     n[7]=n[3];
     m[3]=d;
     }
    }
  }
printf("%c %d\n%c %d\n%c %d\n%c %d",n[4],m[0],n[5],m[1],n[6],m[2],n[7],m[3]);
return 0;
}
/*
 * 1.cpp
 *
 *  Created on: 2010-11-20
 *      Author: jsgl
 */
int main(){
	int z,q,s,l;//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)
							&&(z+q==s+l)
							&&(z+l>s+q)
							&&(z+s<q)
							)//?????????? ??????????
					{
						int a[4],t;//a?????????t???????
						a[0]=z;
						a[1]=q;
						a[2]=s;
						a[3]=l;
						char b[5]={"zqsl"},temp;//???b???????????????
						for (int i=1;i<4;i++)//???????????????????????
							for (int j=0;j<i;j++)
							{
								if (a[j]<a[i])
								{
									t=a[i];
									a[i]=a[j];
									a[j]=t;

									temp=b[i];
									b[i]=b[j];
									b[j]=temp;
								}
							}
						for (int i=0;i<4;i++){//??????????
							cout <<b[i]<<" "<<a[i]*10<<endl;
							}
						return 0;//????????
					}

	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 == s +l &&
					   z + l > s + q &&
					   z + s < q)
					   cout << "l " << l * 10 << '\n' 
					        << "q " << q * 10 << '\n'
							<< "z " << z * 10 << '\n' 
		                    << "s " << s * 10 << endl;
				}
	return 0;
}
int main()
{
    int a[5], b[5] = {0, 1, 2, 3, 4}, z, q, s, l, i, j, k;
    char c[5] = {' ', 'z', 'q', 's', 'l'};
    for (z = 10; z <= 50; z += 10)
      for (q = 10; q <= 50; q += 10)
        for (s = 10; s <= 50; s += 10)
        {
            l = z + q - s;
            if ((l < 10) || (l > 50)) continue;
            if ((z + l > s + q) && (z + s < q)) 
              {
                   a[1] = z; 
                   a[2] = q;
                   a[3] = s;
                   a[4] = l;
                   }
            }
    for (i = 3; i >= 1; i--)
      for (j = 1; j <= i; j++)
        if (a[b[j]] < a[b[j+1]]) 
        {k = b[j]; b[j] = b[j+1]; b[j+1] = k;}
    for (i = 1; i <= 4; i++)
      cout << c[b[i]] << ' ' << a[b[i]] << endl;
    return(0);
}
int main()
{
    int z,q,s,l,o=0;
    for(z=10;z<=50&&o<1;z=z+10)
    for(q=10;q<=50&&o<1;q=q+10)
    for(s=10;s<=50&&o<1;s=s+10)
    for(l=10;l<=50&&o<1;l=l+10)
    {
                          if(z+q==s+l&&z+l>s+q&&z+s<q)
                          {o=1;}
                          }
    z=z-10;q=q-10;s=s-10;l=l-10;
    int a[5];
    char w[5];
    a[1]=z,w[1]='z';
    a[2]=q,w[2]='q';
    a[3]=s,w[3]='s';
    a[4]=l,w[4]='l';
    int i,j,x;
    char y;
    for(i=1;i<=3;i++)
    for(j=1;j<=4-i;j++)
    {if (a[j]>a[j+1])
    {x=a[j+1];a[j+1]=a[j];a[j]=x;
    y=w[j+1];w[j+1]=w[j];w[j]=y;}}
    int n;
    for(n=4;n>=1;n--)
    {cout<<w[n]<<" "<<a[n]<<endl;}
    return 0;
}
int main()
{
    int z,q,s,l;
    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))
        {
            if(z<s)
            {
                printf("l %d\nq %d\ns %d\nz %d",l,q,s,z);

            }
            else
            printf("l %d\nq %d\nz %d\ns %d",l,q,z,s);
        }

    }
    return 0;
}
int main()
{
	int z,q,s,l;
	for(z=1;z<6;z++) 
		for(s=1;s<6;s++) 
			for(q=z+s+1;q<6;q++) 
			{
				l=z+q-s;
				if ((z+l)>(s+q) && l<6 && l>0)
				{
					z*=10;s*=10;q*=10;l*=10;
					
					if (l>q) {
						cout << "l " << l << endl;
						cout << "q " << q << 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;
					}
				}
			}

}
int main()
{
	char a[4]={'z','q','s','l'};
	char m;
	int b[4],n,k,i,j;
	for(b[0]=10;b[0]<=50;b[0]=b[0]+10)
	{
		for(b[1]=10;b[1]<=50;b[1]=b[1]+10)
		{
			if(b[0]==b[1])
			{
				continue;
			}
			for(b[2]=10;b[2]<=50;b[2]=b[2]+10)
			{
				if(b[2]==b[0]||b[2]==b[1])
				{
					continue;
				}
				for(b[3]=10;b[3]<=50;b[3]=b[3]+10)
				{
					if(b[3]==b[0]||b[3]==b[1]||b[3]==b[2])
					{
						continue;
					}
					if(b[0]+b[1]==b[2]+b[3]&&b[0]+b[3]>b[1]+b[2]&&b[0]+b[2]<b[1])
					{
						for(i=0;i<3;i++)
						{
							for(j=3;j>i;j--)
							{
								if(b[j]>b[j-1])
								{
									n=b[j];
									b[j]=b[j-1];
									b[j-1]=n;
									m=a[j];
									a[j]=a[j-1];
									a[j-1]=m;
								}
							}
						}
                        for(k=0;k<4;k++)
						{
	                       	cout<<a[k]<<' '<<b[k]<<endl;
						}
					}
				}
			}
		}
	}
	return 0;
}
int main()
{
	int z, q, s, l;
	char a = 'z', b = 'q', c = 's', d = 'l';
	int temp;
	char chtemp;
	for (z = 1; z <= 5; z++)
	{
		for (q = 1; q <= 5; q++)
		{
			if (q == z)
				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)
					{
						if (z > q)
						{
							temp = z;
							z = q;
							q = temp;
							chtemp = a;
							a = b;
							b = chtemp;
						}
						if (q > s)
						{
							temp = s;
							s = q;
							q = temp;
							chtemp = c;
							c = b;
							b = chtemp;
							if (z > q)
							{
								temp = z;
								z = q;
								q = temp;
								chtemp = a;
								a = b;
								b = chtemp;
							}
						}
						if (s > l)
						{
							temp = s;
							s = l;
							l = temp;
							chtemp = c;
							c = d;
							d = chtemp;
							if (q > s)
							{
								temp = s;
								s = q;
								q = temp;
								chtemp = c;
								c = b;
								b = chtemp;
								if (z > q)
								{
									temp = z;
									z = q;
									q = temp;
									chtemp = a;
									a = b;
									b = chtemp;
								}
							}
						}
											goto part1;
					}
				}
			}
		}
	}
	part1:
							cout << d << " " << l * 10 << endl
							 << c << " " << s * 10 << endl
							 << b << " " << q * 10 << endl
							 << a << " " << z * 10 << endl;
	return 0;
}
/*
 * p3.cpp
 *
 *  Created on: 2010-11-20
 *      Author: jsgl
 */
int main()
{
	int z,q,s,l,i;
	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)&&(z+l>q+s)&&(z+s<q))          //??

		{
		char k[100];
	k[z]='z';k[q]='q';k[l]='l';k[s]='s';          //??
	for(i=50;i>=10;i=i-10)
	if(i==z||i==q||i==s||i==l)
	cout<<k[i]<<' '<<i<<endl;
					}

				}}}}
	return 0;
}
struct ren
{
       char name;
       int w;
}a[4];
main()
{
      a[0].name='z';
      a[1].name='q';
      a[2].name='s';
      a[3].name='l';
      int i,j,k,h,b=0,t;
      char T;
      for(i=5;i>2;i--)
      {        
            for(j=1;j<i;j++)
            {
                   for(k=1;k<i-j;k++)
                   {
                       for(h=1;h<=5;h++)
                       {
                            if((i+j==k+h)&&(j+h>i+k))
                             {b=1;break;}           
                       }
                       if(b==1) break;              
                   } 
                   if(b==1) break;        
            } 
            if(b==1) break;         
      }
      a[1].w=i;
      a[0].w=j;
      a[2].w=k;
      a[3].w=h;
      for(int g=0;g<4;g++)
      {
            for(int f=g+1;f<4;f++)
            {
                    if(a[f].w>a[g].w)
                    {
                       t=a[f].w;
                       a[f].w=a[g].w; 
                       a[g].w=t; 
                       T=a[f].name;
                       a[f].name=a[g].name; 
                       a[g].name=T;            
                    }  
            }
            printf("%c %d\n",a[g].name,a[g].w*10);
      }
      getchar();
      getchar();
      
}
int main()
{
    int i,z,q,s,l,t,j,a[4]={0};

	char b[4]={0},p;

	for(z=1;z<6;z++)

	{

		for(q=1;q<6;q++)

		{

			for(s=1;s<6;s++)

			{

				for(l=1;l<6;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(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;

										p=b[i];

										b[i]=b[j];

										b[j]=p;

								}

							}

						}

					}

			}

		}

	}

	for(i=0;i<4;i++)

		cout<<b[i]<<" "<<a[i]*10<<endl;

	return 0;

}
/*???
 ???    1200012876
 2012?10?25?9:44:36      */
int main() {
	int Z, Q, S, L; //??????Z?Q?S?L
	for (Z = 10; Z <= 50; Z += 10) { //Z,Q,S,L???10???50
		for (Q = 10; Q <= 50; Q += 10) {
			if (Z == Q)
				continue; //Z?Q?????
			for (S = 10; S <= 50; S += 10) {
				if (S == Z || S == Q)
					continue;//S?Z?Q?????
				for (L = 10; L <= 50; L += 10) {
					if (L == Z || L == S || L == Q)
						continue;//L?Z?Q?S?????
					if (((Z + Q) == (S + L)) + ((Z + L) > (Q + S)) + ((Z + S)
							< Q) == 3) {//????????
						for (int i = 50; i > 0; i -= 10) {//????????
							if (i == Z)
								cout << "z " << Z << endl;
							if (i == Q)
								cout << "q " << Q << endl;
							if (i == S)
								cout << "s " << S << endl;
							if (i == L)
								cout << "l " << L << endl;
						}
					}
				}
			}
		}
	}
	return 0;
}//????
//??:???
//???1000012856
//???2010.11.20
//???

int main()
{
	int a[4] = {0}, i, j, m, n;
	for(i = 10; i <= 50; i = i+10)
		for(j = 10; j <= 50; j = j+10)
			for(m = 10; m <= 50; m = m+10)
				for(n = 10; n <= 50; n = n+10)
				{
					a[0] = i;
					a[1] = j;
					a[2] = m;
					a[3] = n;
					if((a[0] != a[1] )&& (a[0] != a[2]) && (a[0] != a[3] )&& (a[1] != a[2]) && (a[1] != a[3]) && (a[2] != a[3]) && ((a[0] + a[1]) == ( a[2] + a[3])) && ((a[0] + a[3]) > (a[2] + a[1])) && ((a[0] + a[2]) < a[1]))
					{
						cout << 'l' << ' ' << a[3] << endl;
						cout << 'q' << ' ' << a[1] << endl;
						cout << 'z' << ' ' << a[0] << endl;
						cout << 's' << ' ' << a[2] << endl;
					}
				}

	return 0;
}
//*******************************************
//*@file:8.cpp                              *
//*@author:??? 1200012894                *
//*@date:2012.10.11                         *
//*@function:????????               *
//*******************************************

int main()
{
	
	//??z, q, s, l??????????????
	int z, q, s, l;

	//??conditioni(i = 1,2,3)??????3????????
	int condition1, condition2, condition3;

	/*sum??conditioni(i = 1, 2, 3)???
	  t?m???????age?label?????*/
	int sum, t, m;

	/*?????????????????
	  ?????????*/
	 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)
				{
					condition1 = ((z + q) == (s + l));
					condition2 = ((z + l) > (s + q));
					condition3 = ((z + s) < q);
					sum = condition1 + condition2 + condition3;
				    if (sum == 3)
					{
						//????????????
						int age[4] = {z, q, s, l};
						char label[4] = {'z', 'q', 's', 'l'};

						//??????????????????????
					    for (int i = 0; i < 3; i++)
							for (int j = 0; j < 3 - i; j++)
							{
								if (age[j] < age[j + 1])
								{
									t = age[j]; 
									age[j] = age[j + 1];
									age[j + 1] = t;
									m = label[j];
									label[j] = label[j + 1];
									label[j + 1] = m;
								}
								
							}

					    //???????????????????
					    for ( int j = 0; j <= 3; j++)
		                cout << label[j] << " " << age[j] << endl;
					}
				}
	return 0;
}
struct person
{
	char name;
	int w;
}stu[5]={{'z',0},{'q',0},{'s',0},{'l',0},{'t',0}};
void main()
{
	int i=0,j=0,k=0,p=0;
	int z,q,s,l;
	int a,b;

	while(i<5)
	{
		i++;
		z=i;
		j=0;
		while(j<5)
		{
			j++;
			if(j!=i)
			{
				q=j;
				k=0;
				while(k<5)
				{
					k++;
					if(k!=i&&k!=j)
					{
						s=k;
						p=0;
						while(p<5)
						{
							p++;
							if(p!=i&&p!=j&&p!=k)
							{
								l=p;
								if(z+q==s+l&&z+l>s+q&&z+s<q)
								{
									stu[0].w=z;
						        	stu[1].w=q;
									stu[2].w=s;
									stu[3].w=l;
									for(a=0;a<4;a++)
									{
										for(b=0;b<4;b++)
										{
											if(stu[b].w<stu[b+1].w)
											{
												stu[5]=stu[b];
												stu[b]=stu[b+1];
												stu[b+1]=stu[5];
											}

										}
									}
									for(a=0;a<4;a++)
									{
										printf("%c %d\n",stu[a].name,10*stu[a].w);
									}
								}
								}
							}
						}
					}
				}
			}
		}

	}
int main()
{
	int z,q,s,l,i,j,k;
	for(i=1;i<=5;i++)
	{
		z=i;
		for(j=1;j<=5;j++)
		{
			q=j;
			for(k=1;k<=5;k++)
			{
				s=k;
				l=z+q-s;
				if(z+l>s+q&&z+s<q&&z!=s&&z!=l&&l<=5)
				{
					int a[5]={0,z,q,s,l},m,m2,t;
					for(m=1;m<4;m++)
					{
						for(m2=1;m2<=4-m;m2++)
						{
							if(a[m2]<a[m2+1])
							{t=a[m2];a[m2]=a[m2+1];a[m2+1]=t;}
						}
					}
					for(m=1;m<=4;m++)
					{
						if(a[m]==z)
							cout<<'z'<<" "<<a[m]*10<<"\n";
						if(a[m]==q)
							cout<<'q'<<" "<<a[m]*10<<"\n";
						if(a[m]==s)
							cout<<'s'<<" "<<a[m]*10<<"\n";
						if(a[m]==l)
							cout<<'l'<<" "<<a[m]*10<<"\n";
					}
				}
			}
		}
	}
	return 0;
}
//****************************************
//*?????? **
//*??????  1100012927       **
//*???2011.10.14                          **
//****************************************

int main ()
{
    int z, q, s, l, a[4], temp, i, j;
    char b[5] = {'z', 'q', 's', 'l', '\0'}, temp1;
    for (z = 1; z < 6; z++)
        for (q = 1; q < 6; q++)
            for (s = 1; s < 6; s++)
                for (l = 1; l < 6; 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 < 3; j++)
                            for (i = 0; i < 3 - j; i++)
                            {
                                if (a[i] < a[i + 1])
                                {
                                    temp = a[i]; a[i] = a[i + 1]; a[i + 1] = temp;
                                    temp1 = b[i]; b[i] = b[i + 1]; b[i + 1] = temp1;
                                }
                            }
                        for (i = 0;i < 4; i++)
                        {
                            a[i] = 10 * a[i];
                            cout << b[i] <<" "<< a[i] << endl;
                        }
                    }
    return 0;
}
int main()
{
	int z, q, s, l, sum = 0;
	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)
					{
						l = z + q - s;
						if (l != z && l != q && l != s && l <= 5 && l > 0)
						{
							sum = (z + l > q + s) + (z + s < q);
							if (sum == 2)
							{
								if (q > l)
									{
										if ( s > l)
										{
											cout << "q" << " " << q * 10 << endl;
											cout << "s" << " " << s * 10 << endl;
											cout << "l" << " " << l * 10 << endl;
											cout << "z" << " " << z * 10 << endl;
										}
										else
										{
											cout << "q" << " " << q * 10 << endl;
											cout << "l" << " " << l * 10 << endl;
											cout << "s" << " " << s * 10 << endl;
											cout << "z" << " " << z * 10 << endl;
										}
									}
								else
								{
									cout << "l" << " " << l * 10 << endl;
									cout << "q" << " " << q * 10 << endl;
									cout << "z" << " " << z * 10 << endl;
									cout << "s" << " " << s * 10 << endl;
								}
								break;
							}
						}
					}
				}
			}
		}
	}
			
	return 0;
}
int main()
{
	int a[4] , c ;
	for( a[0] = 10 ; a[0] < 60 ; a[0] += 10 )
	for( a[1] = 10 ; a[1] < 60 ; a[1] += 10 )
	{
		if( a[1] == a[0] )continue ;
		for( a[2] = 10 ; a[2] < 60 ; a[2] += 10 )
		{
			if( a[2] == a[0] || a[2] == a[1] ) continue ;
			for( a[3] = 10 ; a[3] < 60 ; 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[2] + a[1] && a[0] + a[2] < a[1] )
				{
					a[0] = a[0] * 1000 + 'z' ;
					a[1] = a[1] * 1000 + 'q' ;
					a[2] = a[2] * 1000 + 's' ;
					a[3] = a[3] * 1000 + 'l' ;
					for( int i = 0 ; i < 4 ; i ++ )
					for( int j = 0 ; j < 3 - i ; j ++ )
					if( a[j] < a[j+1] )
					{
						c = a[j] ;
						a[j] = a[j+1] ;
						a[j+1] = c ;
					}
					for( int i = 0 ; i < 4 ; i ++ )
					cout << ( char )( a[i] % 1000 ) << " " << a[i] / 1000 << endl ;
				}
			}
		}
	}
	return 0 ;
}
/*???*/
int main ()
{
	int z,q,s,l;
	for (z=1;z<=5;z++)
	{
		for (q=1;q<=5;q++)
		{
			if (q!=z)
			{
				for (s=1;s<=5;s++)
				{
					if (s!=q&&s!=z)
					{
						for (l=1;l<=5;l++)
						{
							if ((l!=z)&&(l!=q)&&(l!=s))
							{
								if ((z+q)==(s+l)&&((z+l)>(s+q))&&((z+s)<q))
								{
 									if (l>q)
									{
										cout << "l " << l*10 << endl;
										cout << "q " << q*10 << endl;
										cout << "z " << z*10 << endl;
										cout << "s " << s*10 << endl;
									}
									if (l<q)
									{
										if ((z<s)&&(l>s))
										{
											cout << "q " << q*10 << endl;
										    cout << "l " << l*10 << endl;
									    	cout << "s " << s*10 << endl;
									    	cout << "z " << z*10 << endl;
										}
										else 
										{
											cout << "q " << q*10 << endl;
										    cout << "z " << z*10 << endl;
									    	cout << "s " << s*10 << endl;
										    cout << "l " << l*10 << endl;
										}
									}

								}
							}
						}
					}
				}
			}
		}
	}
	return 0;
}
/*
 * shit.cpp
 *
 *  Created on: 2012-10-15
 *      Author: Administrator
 */

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