semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main(){
	int z,q,s,l;
	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)){
						int n[4]={z,q,s,l};
						int i,j,k;
					 char m[6];
					 m[z]='z';
					 m[q]='q';
					 m[s]='s';
					 m[l]='l';
					 for(i=0;i<3;i++)
					   for(j=0;j<3-i;j++)
						   if(n[j]<n[j+1]){
							   k=n[j+1];
					           n[j+1]=n[j];
					           n[j]=k;}
						for(i=0;i<4;i++)
					   cout<<m[n[i]]<<" "<<10*n[i]<<endl;
						break;}}}}
					
    	return 0;
     }
int main()
{
	int z,q,s,l,a[4];char b[4]={'z','q','s','l'};
	for(z=10;z<=50;z=z+10)
	{
		for(q=10;q<=50;q=q+10)
		{
			if(q!=z)
				for(s=10;s<=50;s=s+10)
				{
					if((s!=q)&&(s!=z))
						for(l=10;l<=50;l=l+10)
						{
							if((l!=s)&&(l!=q)&&(l!=z))
								
								if(((z+q)==(s+l))&&((z+l)>(q+s))&&((z+s)<q))
								{
									a[0]=z;
									a[1]=q;
									a[2]=s;
									a[3]=l;
									for(int k=0;k<4;k++)
									{
										for(int j=0;j<3-k;j++)
										{
											int q;
											char p;
											if(a[j]>a[j+1])
											{
												q=a[j];
												a[j]=a[j+1];
												a[j+1]=q;
												p=b[j];
												b[j]=b[j+1];
												b[j+1]=p;
											}
										}
									}
									for(int w=0;w<4;w++)
									{
										cout<<b[3-w]<<" "<<a[3-w]<<endl;
									}
								}
						}
				}
		}
	}
    return 0;
}
int main()
{
	int a=0,b=0,c=0,d=0,k=10;
	char name[6]=" zqsl";
	int weight[5]={0};
	int C1=0,C2=0,C3=0;
    int i, j;
	for(a=1;a<=5;a++)
		for(b=1;b<=5;b++)
			for(c=1;c<=5;c++)
				for(d=1;d<=5;d++)
				{
						C1=(a+b==c+d);
	                    C2=(a+d) > (b+c);
	                    C3=(a+c) < b;
					if(a!=b && a!=c && a!=d&& b!=c && b!=d && c!=d && c !=d && C1 && C2 && C3)
					{
					weight[1]=a;
					weight[2]=b;
					weight[3]=c;
					weight[4]=d;
					}
				
				}
	int a1=0;
	char a2=' ';
	for(i=0;i<=2;i++)
		for(j=1;j<=3-i;j++)
		{
			if(weight[j]<weight[j+1])
			{
				a1=weight[j];
				weight[j]=weight[j+1];
				weight[j+1]=a1;
				
				a2=name[j];
				name[j]=name[j+1];
				name[j+1]=a2;
			}
		
		}
		for(i=1;i<=4;i++)
		printf("%c %d\n",name[i],weight[i]*10);	
		
		return 0;

}
int main (){
	int /*i=0,j=0,*/k=0;//ijk??????k???????
	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(int i=0;i<=2;i++)                             //?????????
							for(int 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;
								}
							}
						for(k=0;k<=3;k++)
						    	cout<<name[k]<<" "<<m[k]*10<<endl;//?????????????
					}
                        //???????????????????????
						//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;
}
/*
 * mid_test.cpp
 *  ???
 *  Created on: 2010-11-20
 *      Author: ????1000010444?
 *???
        ???????????????????????????????????????????
        ?????????????10???????????????50????????????
        ?????????????????; ?????????????????????????
        ????????????????????????????????????????????
        ???????????????????????
 *
 *
 */

int main()
{
	int z,q,s,l;//z,q,s,l??????????????
	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==q)||(s==z))continue;
				for(l=10;l<=50;l=l+10)
				{
					if((z+q)!=(s+l))continue;//????????
					else if((z+l)<=(s+q))continue;
					else if((z+s)>=q)continue;
					else if((l==z)||(l==q)||(l==s))continue;
					else
						{
						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, j, k, n, t;
	for (i = 1; i <= 5; i++)
	{
		z = i;
		for (j = 1; j <= 5; j++)
		{
			q = j;
			if (q != z)
			{
				for (k = 1 ; k <= 5; k++)
				{
					s = k;
					if (s != q && s != z)
					{
						for (n = 1; n <= 5; n++)
						{
							l = n;
							if (l != z && l != q && l != s)
							{
								if ((z + q) == (s + l) && (z + l) > (s + q) && (z + s) < q)
								{
									z = z * 10; q = q * 10;
									s = s * 10; l = l * 10;
									for (t = 50; t >= 0; t = t - 10)
									{
										if (z == t)
											cout << "z " << z <<endl;
										if (q == t)
											cout << "q " << q <<endl;
										if (s == t)
											cout << "s " << s <<endl;
										if (l == t)
											cout << "l " << l <<endl;
									}
								}

							}
						}
					}
				}
			}
		}
	}
	
	return 0;
}
int main()
{
	int z,q,s,l;
	int zWeight,qWeight,sWeight,lWeight;
	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)
					{
						zWeight=10*z;
						qWeight=10*q;
						sWeight=10*s;
						lWeight=10*l;
					}
				}
			}
		}
	}
	if(lWeight>qWeight&&qWeight>zWeight&&zWeight>sWeight)
			{
			cout<<"l"<<" "<<lWeight<<endl;
			cout<<"q"<<" "<<qWeight<<endl;
			cout<<"z"<<" "<<zWeight<<endl;
			cout<<"s"<<" "<<sWeight<<endl;
			}
	if(lWeight>qWeight&&qWeight>sWeight&&sWeight>zWeight)
			{
			cout<<"l"<<" "<<lWeight<<endl;
			cout<<"q"<<" "<<qWeight<<endl;
			cout<<"s"<<" "<<sWeight<<endl;
			cout<<"z"<<" "<<zWeight<<endl;
			}

}
//****************************************
//***??????**
//***??????**
//***???2012.10.9**
//****************************************
int main()
{
	int z,q,s,l,i,j,w[4];              //??z,q,s,l?????????i,j?????w????
	char n[4] = {'z','q','s','l'};     //???n[]????????????
	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)
							w[0] = z,w[1] = q,w[2] = s,w[3] = l;
					}}}}}
	//??????????????????
	for (i = 5;i >= 1; i --)                  //???????50,40,30,20,10,??????
	{
		for(j = 0;j < 4;j ++)
		{
			if (w[j] == i)                    //??j?????????????
				cout << n[j] << " " << 10 * w[j] << endl;
		}
	}
	return 0;
}
int main()
{
    int z , q, s, l;
	z = 10;
	int a , b, c, d;
	char x1, x2, x3, x4;
	int y1 , y2, y3, y4;
    for (a=10; a<=50 ; a = a + 10)
	{
	    q=10;
		for (b=10; b<=50;b = b + 10)
		{
			s = 10;
			for(c=10; c<=50; c = c +10)
			{
				l = 10;
				for(d = 10; d <= 50; d = d +10)
				{
					if (z != q && q != s && s != l && z+q == s+l && z+l > s+q && z+s < q)  
					{
                        y1=z;
						x1='z';
						if (y1 < q)
						{   y2 =q;
						    x2 = 'q';
						}
						else
						{
						    y1 = q;
							x1 = 'q';
							y2 = z;
							x2 = 'z';
						}
						if (y2 < s)
						{	
							y3 =s;
							x3 = 's';
						}
						else 
						{
						    if (s>y1)
							{
							    y3= y2;
								x3 = x2;
								y2 = s;
								x2 = 's';
							}
							else 
							{
							    y3 = y2;
								x3 = x2;
								y2 = y1;
								x2 = x1;
								y1 = s;	
								x1 = 's';
							}

						}
						if (y3 < l)
						{
							y4 = l;
						    x4 = 'l';
						}
						else 
						{
							y4 =y3;
							x4 = x3;
							if (l > y2)
							{
								y3 =l;
							    x3 = 'l';
							}
							else 
							{
							    y3 =y2;
								x3 =x2;
								if (l > y1)
								{
									y2 =l;
								    x2 = 'l';
								}
								else 
								{
									y2 =y1;
									x2 = x1;
								    y1= l;
									x1='l';
								}
							}

						}
						cout << x4 << " " << y4 << endl;
						cout << x3 << " " << y3 << endl;
						cout << x2 << " " << y2 << endl;
						cout << x1 << " " << y1 << endl;
						break;
					}
					else
						l = l + 10;
				}
				s = s + 10;
			}
			q = q + 10;
		}
		z = z + 10;
	}
	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))//?????q?????s?z?l????q??z?????s?
					  cout <<"l"<<" "<<l<<endl<<"q"<<" "<<q<<endl<<"z"<<" "<<z<<endl<<"s"<<" "<<s<<endl;
			  }
		  }
	  }
  }
  return 0;
}
int main()
{
	int weight[4],i,j,k;
	char name[4][2]={"z","q","s","l"},t[2];
	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]++)
			{
				for (weight[3]=1;weight[3]<5;weight[3]++)
				{
					if (weight[0]+weight[1]==weight[2]+weight[3] && weight[0]+weight[3]>weight[2]+weight[1] && weight[0]+weight[2]<weight[1])
						break;
				}
				if (weight[0]+weight[1]==weight[2]+weight[3] && weight[0]+weight[3]>weight[2]+weight[1] && weight[0]+weight[2]<weight[1])
						break;
			}
			if (weight[0]+weight[1]==weight[2]+weight[3] && weight[0]+weight[3]>weight[2]+weight[1] && weight[0]+weight[2]<weight[1])
						break;
		}
		if (weight[0]+weight[1]==weight[2]+weight[3] && weight[0]+weight[3]>weight[2]+weight[1] && weight[0]+weight[2]<weight[1])
						break;
	}
	for (i=0;i<4;i++)
	{
		for(j=1;j<4-i;j++)
		{
			if(weight[j-1]<weight[j])
			{
				k=weight[j-1];weight[j-1]=weight[j];weight[j]=k;
				strcpy(t,name[j-1]);
				strcpy(name[j-1],name[j]);
				strcpy(name[j],t);
			}
		}
	}
	for (i=0;i<4;i++)
		cout <<name[i]<<" "<<10*weight[i]<<endl;
	return 0;	

}
int main()
{
   int z=10,q=10,s=10,l=10;
   int i,j,k,p;
   for(i=10;i<=50;i=i+10)
   {
	   j=10;
	   for(j=10;j<=50;j=j+10)
	   {
		   k=10;
		   for(k=10;k<=50;k=k+10)
		   {
			   p=10;
			   for(p=10;p<=50;p=p+10)
			   {
				   z=i,q=j,s=k,l=p;
				   if((z+q==s+l)+(z+l>s+q)+(z+s<q)==3)
					   break;

			   }
			   if((z+q==s+l)+(z+l>s+q)+(z+s<q)==3)
			   					   break;
	       }
		   if((z+q==s+l)+(z+l>s+q)+(z+s<q)==3)
		   					   break;
	   }
	   if((z+q==s+l)+(z+l>s+q)+(z+s<q)==3)
	   					   break;
   }

 int a[4]={z,q,s,l};
 int t, J;
 for(int I=0;I<=2;I++)
	{
	J=0;
	for(;J<=2;J++)
		if(a[J]<a[J+1])
		{
			t=a[J];a[J]=a[J+1];a[J+1]=t;
		}
	}
   char g[4] = {0};
for(int c=0;c<=3;c++)
	{
	if(a[c]==z)
	g[c]='z';
	else if(a[c]==q)
    g[c]='q';
	else if(a[c]==s)
    g[c]='s';
	else if(a[c]==l)
	g[c]='l';
	}
for(int b=0;b<=3;b++)
cout<<g[b]<<" "<<a[b]<<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==s+l&&z+l>s+q&&z+s<q) 
{
cout <<"l "<<10*l<<endl<<"q "<<10*q<<endl<<"z "<<10*z<<endl<<"s "<<10*s<<endl;
}
return 0 ;
}
int main()
{
	int z,q,s,l;
	char name[6];
	int state[3],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==q||s==z) continue;
				for(l=1;l<=5;l++)
				{
					if( l==s||l==q||l==z) continue;
					state[0]=(z+q==s+l);
					state[1]=(z+l>s+q);
					state[2]=(z+s<q);
					if(state[0]==1&&state[1]==1&&state[2]==1)
					{
						name[z]='z';
						name[q]='q';
						name[s]='s';
						name[l]='l';
						for(i=5;i>0;i--)
						{
							if(i==z) cout<<name[z]<<" "<<i*10<<endl;
							if(i==q) cout<<name[q]<<" "<<i*10<<endl;
							if(i==s) cout<<name[s]<<" "<<i*10<<endl;
							if(i==l) cout<<name[l]<<" "<<i*10<<endl;
						}
					}
				}
				
			}
			
		}
	}
	return 0;
}
int main()
{
    /*printf("l 50\n");
    printf("q 40\n");
    printf("z 20\n");
    printf("s 10");*/
    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)
    continue;
    else if(z+l<=s+q)
    continue;
    else if(z+s>=q)
    continue;
    if(z==q || z==s || z==l || q==s || q==l || s==l)
    continue;
    else
    goto l;
    }
    }
    }
    }
l:  z*=10; q*=10; s*=10; l*=10;
    char bskc,name[4]={'z','q','s','l'};
    int bski,weight[4];
    weight[0]=z; weight[1]=q; weight[2]=s; weight[3]=l; 
    for(int i=0;i<4;i++){
    for(int j=i+1;j<4;j++){
    if(weight[i]<weight[j])
    {
        bski=weight[i];
        weight[i]=weight[j];
        weight[j]=bski;
        bskc=name[i];
        name[i]=name[j];
        name[j]=bskc;
    }
    }
    }
    for(int i=0;i<4;i++)
    printf("%c %d\n",name[i],weight[i]);
    return 0;
}
int main()
{
	char a,b,c,d;
	int e,f,g,h;
	a='z';
	b='q';
	c='s';
	d='l';
	e=20;
	f=40;
	g=10;
	h=50;
	printf("%c %d\n",d,h);
	printf("%c %d\n",b,f);
	printf("%c %d\n",a,e);
	printf("%c %d\n",c,g);
	return 0;
}
int main()
{
	int z=0,q=0,s=0,l=0;
	for(z=10;z<=50;z=z+10)
		for(q=10;q<=50;q+=10)
			for(s=10;s<60;s+=10)
				for(l=10;l<60;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;
}
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)!=0))
						{
							int weight[4]={z,q,s,l};
							char name[4]={'z','q','s','l'};
							int j=0,k=0;
							for(j=0;j<3;j++)
							{
								for(k=0;k<3-j;k++)
								{
									if(weight[k]<weight[k+1])
									{
										int s;s=weight[k];weight[k]=weight[k+1];weight[k+1]=s;
										char t;t=name[k];name[k]=name[k+1];name[k+1]=t;
									}
								}
							}
							for(k=0;k<4;k++)
								cout<<name[k]<<' '<<weight[k]<<'0'<<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))
								{
									cout << "l " << l << endl;
								    cout << "q "<< q << endl;
									cout << "z " << z <<endl;								
									cout << "s " << s << endl;
								}
							}
					}
			}
	}
	return 0;
}
int main()
{
	int a[5] = {0};
	char b[5] = {0,'z','q','s','l'};
	int flag = 0;
	int i = 0;
	int j = 0;
	int t = 0;
	char tt = 0;

	for (a[1] = 10; a[1] <= 50; a[1] += 10)
	{
		for (a[2] = 10; a[2] <= 50; a[2] += 10)
		{
			if (a[1] == a[2])
				continue;
			for (a[3] = 10; a[3] <= 50; a[3] += 10)
			{
				if ((a[1] == a[3]) || (a[2] == a[3]))
					continue;
				for (a[4] = 10; a[4] <= 50; a[4] += 10)
				{
					if ((a[1] == a[4]) || (a[2] == a[4]) || (a[3] == a[4]))
						continue;
					if(((a[1] + a[2]) == (a[3] + a[4])) 
						&& ((a[1] + a[4]) > (a[3] + a[2])) && ((a[1] + a[3]) < a[2]))
					{
						flag = 1;
						break;
					}
				}
				if (flag == 1)
					break;
			}
			if (flag == 1)
				break;
		}
		if (flag == 1)
			break;
	}
	for (i = 1; i <= 3; i ++)
		for (j = 1; j <= 4 - i; j ++)
			if (a[j] < a[j + 1])
			{
				t = a[j];
				a[j] = a[j + 1];
				a[j + 1] = t;
				tt = b[j];
				b[j] = b[j + 1];
				b[j + 1] = tt;
			}
	cout << b[1] << " " << a[1] << endl << b[2] << " " << a[2] << endl
		<< b[3] << " " << a[3] << endl << b[4] << " " << a[4] << endl;

	return 0;
}
/*
 * ???: 1000010191_test3_3.cpp
 * ??: ???
 * ????: 2010-11-20
 * ??: ???
 */


int main()
{
	//z,q,s,l??4????
	for (int z=10;z<=50;z+=10)
		for (int q=10;q<=50;q+=10)
			for (int s=10;s<=50;s+=10)
				for (int l=10;l<=50;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) //????????
						{
							char d[51]={0}; //????
							d[z]='z';
							d[q]='q';
							d[s]='s';
							d[l]='l';
							for (int i=50;i>=10;i-=10)
								if (d[i]!=0)
									cout<<d[i]<<' '<<i<<endl;
						}
	return 0;						
}
int main()
{
	int z, q, s, l, cc1, cc2, cc3, cc;
	void line (int, int, int, int);
	for (z = 1; z <=5; z++)
		for (q = 1; q <= 5; q++)
			for (s = 1; s <= 5; s++)
				for (l = 1; l <=5; l++)
				{
					cc1 = (z + q) == (s + l);
					cc2 = (z + l) > (s + q);
					cc3 = (z + s) < q;
					cc = cc1 + cc2 + cc3;
					if (cc == 3)
					{
						cout << 'l' << " " << l * 10 << endl;
						cout << 'q' << " " << q * 10 << endl;//????l??,???q
						if (z > s)
						{
							cout << 'z' << " " << z * 10 << endl;
							cout << 's' << " " << s * 10 << endl;
						}
						if (s > z)
						{
							cout << 's' << " " << s * 10 << endl;
							cout << 'z' << " " << z * 10 << 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&&z!=q&&z!=s&&z!=l&&q!=s&&q!=l&&s!=l )
	{
				cout<<"l "<<l<<endl<<"q "<<q<<endl<<"z "<<z<<endl<<"s "<<s;
				
	}

	}
	}
	}
}
return 0;
}
int main()
{
	int a[4],i=0;
	char A[4]={'z','q','s','l'};//??????????
	for(a[0]=1;a[0]<=5;a[0]++)
	{
		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]++)//????????????
					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[2])+(a[0]!=a[3])+(a[1]!=a[3])+(a[2]!=a[3])==7)//??????
					{
						for(i=0;i<5;i++){if(a[i]==5){cout<<A[i]<<' '<<"50"<<endl;break;}}
						for(i=0;i<5;i++){if(a[i]==4){cout<<A[i]<<' '<<"40"<<endl;break;}}
						for(i=0;i<5;i++){if(a[i]==3){cout<<A[i]<<' '<<"30"<<endl;break;}}
						for(i=0;i<5;i++){if(a[i]==2){cout<<A[i]<<' '<<"20"<<endl;break;}}
						for(i=0;i<5;i++){if(a[i]==1){cout<<A[i]<<' '<<"10"<<endl;break;}}//??a[i]???????????A[i]
					}
			}
		}
	}					
	return 0;
}
/*
??
???
????yang?
???2012.10.14
*/

int main()
{
	int z,q,s,l,x,a[5],i,j,k;//?????????
	char b[5],y;//?????b[5]
	b[1]='z';b[2]='q';b[3]='s';b[4]='l';//??b???
	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[1]=z;a[2]=q;a[3]=s;a[4]=l;//?????????????????a
						for(i=1;i<=4;i++)
						{
							for(j=1;j<=4;j++){
								if(a[i]<a[j]&&i<j)
								{x=a[i];a[i]=a[j];a[j]=x;y=b[i];b[i]=b[j];b[j]=y;}//??????????b??
							}
						}
					}
				}
			}
		}
	}
	for(k=1;k<=4;k++)
	{
		cout<<b[k]<<" "<<a[k]*10<<endl;
	}//????
	return 0;
}
int main()
{
  int a,b,c,d;
  a=50;
  b=40;
  c=20;
  d=10;
  printf("l %d\n",a);
  printf("q %d\n",b);
  printf("z %d\n",c);
  printf("s %d\n",d);
  return 0;
}
int main()//?????
{//?????
	int z,q,s,l,word[5],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;
					word[1]=((z+q)==(s+l));
					word[2]=(z+l)>(s+q);
					word[3]=(z+s)<q;
					if(word[1]+word[2]+word[3]==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,j,k,n,a[100];
char b[100];
for(i=1;i<=4;i++)
{
    z=i*10;
	for(j=1;j<=4;j++)
	{
		q=j*10;
		for(k=1;k<=4;k++)
		{
			s=k*10;
			l=z+q-s;
			if(z+l>s+q&&z+s<q)
			{
		      a[1]=z;
			  b[a[1]]='z';
			  a[2]=q;
			  b[a[2]]='q';
			  a[3]=s;
			  b[a[3]]='s';
			  a[4]=l;
			  b[a[4]]='l';
			}
		}
	}
}
for(i=1;i<=4;i++)
{
	for(j=1;j<=3;j++)
	{
		if(a[j]<a[j+1])
		{
			n=a[j];
			a[j]=a[j+1];
			a[j+1]=n;
		}
	}
}
for(i=1;i<=4;i++)
{
	cout<<b[a[i]]<<" "<<a[i]<<endl;
}
return 0;
}
int main()
{
	int z,q,s,l;
	int m0,m1,m2,m3;
	int n0,n1,n2,n3;
	int a[4],b[4];
	int i;
	b[0]='z';b[1]='q';b[2]='s';b[3]='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)
					{
						a[0]=z;a[1]=q;a[2]=s;a[3]=l;
						for(i=0;i<=3;i++)
						{
							if(a[i]>=a[0]&&a[i]>=a[1]&&a[i]>=a[2]&&a[i]>=a[3])
							{
								m0=a[i];n0=b[i];a[i]=0;break;
							}
						}
						for(i=0;i<=3;i++)
						{
							if(a[i]>=a[0]&&a[i]>=a[1]&&a[i]>=a[2]&&a[i]>=a[3])
							{
								m1=a[i];n1=b[i];a[i]=0;break;
							}
						}
						for(i=0;i<=3;i++)
						{
							if(a[i]>=a[0]&&a[i]>=a[1]&&a[i]>=a[2]&&a[i]>=a[3])
							{
								m2=a[i];n2=b[i];a[i]=0;break;
							}
						}
						for(i=0;i<=3;i++)
						{
							if(a[i]>=a[0]&&a[i]>=a[1]&&a[i]>=a[2]&&a[i]>=a[3])
							{
								m3=a[i];n3=b[i];a[i]=0;break;
							}
						}
						printf("%c %d\n%c %d\n%c %d\n%c %d\n",n0,m0,n1,m1,n2,m2,n3,m3);
					}
				}
			}
		}
	}
	return 0;
}
int main()
{
	int a,b,c,d,m[5],e;
	char n[5]={'0','z','q','s','l'},f;
	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)==(c+d) && (a+d)>(b+c) && (a+c)<b)
					{
						m[1]=a; m[2]=b; m[3]=c; m[4]=d;
						for (int i=1;i<=3;i++)
						{
							for (int j=1;j<=3-i;j++)
							{
								if (m[j]>m[j+1])
								{
									e=m[j];
									f=n[j];
									m[j]=m[j+1];
									n[j]=n[j+1];
									m[j+1]=e;
									n[j+1]=f;
								}
							}
						}
					}
				}
			}
		}
	}
	for (int k=4;k>=1;k--)
	cout<<n[k]<<" "<<m[k]*10<<endl;		 
					
	
	return 0;
}
int main()
{
int a[4],i,j,k,Z,Q,S,L;    //??????????????????????
char b[4]={'z','q','s','l'},y;     //??????????????
for(a[0]=10;a[0]<=50;a[0]+=10)        //???????????
     {
     for(a[1]=10;a[1]<=50;a[1]+=10)
          {
          for(a[2]=10;a[2]<=50;a[2]+=10)
               {
               a[3]=a[0]+a[1]-a[2];
               if((a[3]>=10)&&(a[3]<=50)&&((a[0]+a[3])>(a[1]+a[2]))&&((a[0]+a[2])<a[1]))
            	   {
            	   Z=a[0];Q=a[1];S=a[2];L=a[3];    //??????????????????????
                   break;break;break;
            	   }
               }
          }
     }
a[0]=Z;a[1]=Q;a[2]=S;a[3]=L;   //????
for(i=2;i>=0;i--)                     //????????????????????????????
	 for(j=0;j<=i;j++)
	 {
		  if(a[i]>a[i+1])
		  {
			   k=a[i];
			   a[i]=a[i+1];
			   a[i+1]=k;
			   y=b[i];
			   b[i]=b[i+1];
			   b[i+1]=y;
		  }
	 }
for(i=3;i>=0;i--)       //??????????????
     {
	 printf("%c %d\n",b[i],a[i]);
     }
return 0;
}
int main ()
{
	int a[5], g = 0, i, j;
	char ch[5][5] = {" ", "z ", "q ","s ","l "};
	for (a[1] = 1; a[1] <= 5; a[1] ++)
	{
		for (a[2] = 1; a[2] <= 5; a[2] ++)
		{
			if(a[1] == a[2])
				continue;
			for (a[3] = 1; a[3] <= 5; a[3] ++)
			{
				if (a[3] == a[1] || a[3] == a[2])
					continue;
				for (a[4] = 1; a[4] <= 5; a[4] ++)
				{
					if(a[4] == a[1] || a[4] == a[2] || a[4] == a[3])
						continue;
					if (a[1] + a[2] == a[3] + a[4] && a[1] + a[4] > a[3] + a[2] && a[1] + a[3] < a[2])
					{
						for (i = 5; i > 0; i --)
						{
							for (j = 1; j < 5; j ++ )
							{
								if (a[j] == i)
								{
									cout << ch[j] << i << '0' << endl;
									break;
								}
							}
						}
						g = 1;
						break;
					}
				}
				if (g == 1)
					break;
			}
			if (g == 1)
				break;
		}
		if ( g == 1 )
			break;
	}
	return 0;
}
int main()
{
    char a[10];
    int z,q,s,l,i;
    for (i=0; i<10; i++)
        a[i] = ' ';
    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)==3)
                    {
                        a[z] = 'z';
                        a[q] = 'q';
                        a[s] = 's';
                        a[l] = 'l';
                    }
                }
    for (i=9; i>=1; i--)
    {
        if (a[i]!=' ')
            printf("%c %d\n",a[i],i*10);
    }
    return 0;
}