semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
//****************************************************
//????????
//??????
//?????2011.11.3 22?49
//****************************************************
int main()
{
    char name[4]={'z','q','s','l'};//??????
    int weight[4];//??????
    int a,b,c;
    int i,j;
    for(weight[0]=1;weight[0]<6;weight[0]++)//?????????????
    {
    for(weight[1]=1;weight[1]<6;weight[1]++)
    {if(weight[0]==weight[1])continue;
    else
      for(weight[2]=1;weight[2]<6;weight[2]++)
      {if(weight[2]==weight[0]||weight[2]==weight[1])continue;
      else
      for(weight[3]=1;weight[3]<6;weight[3]++)
        {if(weight[3]==weight[0]||weight[3]==weight[1]||weight[3]==weight[2])continue;
        else
        {//?????????
          a=(weight[0]+weight[1]==weight[2]+weight[3]);
          b=(weight[0]+weight[3]>weight[2]+weight[1]);
          c=(weight[0]+weight[2]<weight[1]);
          if(a&&b&&c==1)//???????
          {
            for(i=5;i>0;i--)//??????
            {
              for(j=0;j<4;j++)
              {if(weight[j]==i)cout<<name[j]<<" "<<weight[j]<<"0"<<endl;}
            }
          }
        }
    }}}}
    cin>>i;
    return 0;
}
int main()
{
    int a, b ,c, d,n1,n2,n3,n4;
    
    for(a=10;a<=50;a+=10)
    {
        for(b=10;b<=50;b+=10)
        {
            for(c=10;c<=50;c+=10)
            {
                for(d=10;d<=50;d+=10)
                if((a+b)==(c+d)&&(a+d)>(b+c)&&(a+c)<b)
                {
                    n1=a>b?a:b;
                    n2=c>d?c:d;
                    n1=n1>n2?n1:n2;
                    n2=40;
                    n3=a<b?a:b;
                    n4=c<d?c:d;
                    n3=n3>n4?n3:n4;
                    n4=n3<n4?n3:n4;
                   
                    if(n1==a)
                    printf("z %d\n",n1);
                    if(n1==b)
                    printf("q %d\n",n1);
                    if(n1==c)
                    printf("s %d\n",n1);
                    if(n1==d)
                    printf("l %d\n",n1);
                    
                     if(n2==a)
                    printf("z %d\n",n2);
                    if(n2==b)
                    printf("q %d\n",n2);
                    if(n2==c)
                    printf("s %d\n",n2);
                    if(n2==d)
                    printf("l %d\n",n2);
                    
                     if(n3==a)
                    printf("z %d\n",n3);
                    if(n3==b)
                    printf("q %d\n",n3);
                    if(n3==c)
                    printf("s %d\n",n3);
                    if(n3==d)
                    printf("l %d\n",n3);
                    
                     if(n4==a)
                    printf("z %d\n",n4);
                    if(n4==b)
                    printf("q %d\n",n4);
                    if(n4==c)
                    printf("s %d\n",n4);
                    if(n4==d)
                    printf("l %d\n",n4);
                    
                }
            }
        }
    }
    
    return 0;
    
}
int main()
{
	int  a[4],j,k,z,q,s,l,temp;
	char b[4],oemp;
	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=10*z;
		q=10*q;
		s=10*s;
		l=10*l;
		a[0]=z,b[0]='z';
		a[1]=q,b[1]='q';
		a[2]=s,b[2]='s';
		a[3]=l,b[3]='l';
        for(j=0;j<3;j++)
	{
		for(k=0;k<3-j;k++)
		{
			if(a[k]<a[k+1])
			{
				temp=a[k];
				oemp=b[k];
			    a[k]=a[k+1];
				b[k]=b[k+1];
			    a[k+1]=temp;
				b[k+1]=oemp;
			}
		}
	}
		}
		}
		}
		}
		}
for(int m=0;m<4;m++)
cout<<b[m]<<" "<<a[m]<<endl;
	return 0;
}
int z, q, s, l;

void check(int num)
{
     if (z == num) cout << "z " << num*10 << endl;
     if (q == num) cout << "q " << num*10 << endl;
     if (s == num) cout << "s " << num*10 << endl;
     if (l == num) cout << "l " << num*10 << endl;
     return ;
}

int main()
{
    for (z = 1; z <= 5; ++z)
      for (q = 1; q <= 5; ++q)
        if (z != q)
        {
              for (s = 1; s <= 5; ++s)
                if (z != s && q != s)
                  for (l = 1; l <= 5; ++l)
                    if (z != l && q != l && s != l)
                    {
                          if ((z + q) == (s + l) &&
                              (z + l) > (s + q) &&
                              (z + s) < q)
                              {
                                   check(5);
                                   check(4);
                                   check(3);
                                   check(2);
                                   check(1);
                              }
                    }
        }
    return 0;
}
int main()
{
	int a[4]={20,40,10,50},i,j,t1,max;
	
	char c[4]={'z','q','s','l'},t2;
	
		for(i=0;i<4;i++)
		{
			max=i;
			for(j=i;j<4;j++)
		{
			if(a[i]<a[j])max=j;
			{
				t1=a[i];
				t2=c[i];
				a[i]=a[max];
				c[i]=c[max];
				a[max]=t1;
				c[max]=t2;
			}
				
		}
		}
			for(i=0;i<4;i++)
			printf("%c %d\n",c[i],a[i]);
		}
void main ()
{
	int a=20,b=40,c=10,d=50;
	char t[4]={'z','q','s','l'};
	printf("%c %d\n%c %d\n%c %d\n%c %d",t[3],d,t[1],b,t[0],a,t[2],c);
}
/*
 * 3.12Weight.cpp
 *
 *  Created on: 2012-10-30
 *      Author: ???
 *      ?????????????????????????????
 */
int main()
{
	int z,q,s,l,s1,s2,s3;//?????????????
	int p,t,i,j;//???????
   	for(z=1;z<=5;z++)
		for(q=1;q<=5;q++)
			for(s=1;s<=5;s++)
				for(l=1;l<=5;l++)//????????????0?1?2?3?????
			{
					 s1=(z+q==s+l);
					 s2=(z+l>s+q);
					 s3=(z+s<q);
					if(s1+s2+s3==3)//????????
					{
					int a[4]={z,q,s,l};
					char b[4]={'z','q','s','l'};
					for(j=1;j<=3;j++)//?????????
                        {
                        	for(i=0;i<=3-j;i++)//????
                        	{
                        		if (a[i]<a[i+1])
                        		{
                        			p=a[i];                  //?a[i]?a[i+1]??
                        			a[i]=a[i+1];
                        			a[i+1]=p;
                        			t=b[i];                  //?b[i]?b[i+1]????
                        			b[i]=b[i+1];
                        			b[i+1]=t;
                        		}
                        	}
                        }
					 for (i=0 ; i<=3 ; i++)
                    {
                        	cout<< b[i]<<" "<<a[i]*10<<endl;//???????????

					}
			}
			}
    return 0;
}
char Name[5]={' ','z','q','s','l'};
int main()
{
    int a,b,c,d,Res[5],m1,m2,m3,m4;
	for(a=10;a<=50;a=a+10)//?????????????
	{
	   for(b=10;b<=50;b=b+10)
	   {
	   	  for(c=10;c<=50;c=c+10)
	      {
	      	for(d=10;d<=50;d=d+10)
	      	{
	      	  	if(a+b==c+d && a+d>b+c && a+c<b)//???????????
	      	  	{
	      	  		Res[1]=a;//?Res???????????
	      	  		Res[2]=b;
	      	  		Res[3]=c;
	      	  		Res[4]=d;
	      	  	}
	      	}
	      }
	   }
    }
    //???4??????????????????
    int m=0,mNum=0; //m???????????mNum??m????????
    for(int x=1;x<=4;x++)
	{
	    if(m<Res[x]) {m=Res[x];mNum=x;}
    }
    cout<<Name[mNum]<<' '<<Res[mNum]<<endl;
    Res[mNum]=0;
    m=0;
	for(int x=1;x<=4;x++)
	{
	    if(m<Res[x]) {m=Res[x];mNum=x;}
    }
    cout<<Name[mNum]<<' '<<Res[mNum]<<endl;
    Res[mNum]=0;
	m=0;
    for(int x=1;x<=4;x++)
	{
	    if(m<Res[x]) {m=Res[x];mNum=x;}
    }
    cout<<Name[mNum]<<' '<<Res[mNum]<<endl;
    Res[mNum]=0;
	m=0;
    for(int x=1;x<=4;x++)
	{
	    if(m<Res[x]) {m=Res[x];mNum=x;}
    }
    cout<<Name[mNum]<<' '<<Res[mNum]<<endl;

    return 0;
}
int differ(int a,int b,int c,int d);
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(differ(z,q,s,l)==0)
						if(z+q==s+l)
							if(z+l>s+q)
								if(z+s<q)
									cout<<"l "<<l<<endl<<"q "<<q<<endl<<"z "<<z<<endl<<"s "<<s<<endl;
	return 0;
}

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

				}

		return 0;
}
int main()
{
	int z,q,s,l;
	for(z=10;z<60;z+=10)
		for(q=10;q<60;q+=10)
			for(s=10;s<60;s+=10)
				for(l=10;l<60;l+=10)
				{
					int w1,w2,w3,w4;
					w1=(z+q==s+l);
					w2=(z+l>s+q);
					w3=(z+s<q);
					w4=(z!=q)&&(z!=s)&&(z!=l)&&(q!=s)&&(q!=l)&&(s!=l);
					if(w1&&w2&&w3&&w4==1)
					{
						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,a[4],i,j,t;
	char rank[51];
	for(z=10;z<=50;z=z+10)
	{
		for(q=10;q<=50;q=q+10)
		{
			if(q==z) continue;
			else
			{
				for(s=10;s<=50;s=s+10)
				{
					if((s==z)||(s==q)) continue;
					else
					{
						for(l=10;l<=50;l=l+10)//?4????4??????????
						{if((l==z)||(l==q)||(l==s)) continue;//??????????????????????
						else
						{
							rank[z]='z';
							rank[q]='q';
							rank[s]='s';
							rank[l]='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(i=0;i<=3;i++)//???????????????
								{
									for(j=0;j<=i;j++)
									{
										if (a[j]<a[i])
										{
										t=a[j];
										a[j]=a[i];
										a[i]=t;
										}
									}
								}
								for(i=0;i<=3;i++)
									cout<<rank[a[i]]<<" "<<a[i]<<endl;
							}
						}
						}
					}
				}
			}
		}
	}
	return 0;
}
int main()
{
	int z,q,s,l,i;
	char weight[6];
	for(z=1;z<6;z++)
	{
		for(q=1;q<6;q++)
		{
			if(z==q)
				continue;
			else
				for(s=1;s<6;s++)
				{
					if(s==z||s==q)
						continue;
					else
						for(l=1;l<6;l++)
						{
							if(l==z||l==q||l==s)
								continue;
							else
								if((z+q)==(s+l)&&(z+l)>(s+q)&&(z+s)<q)
								{
									weight[z]='z';
									weight[q]='q';
									weight[s]='s';
									weight[l]='l';
									for(i=5;i>0;i--)
									{
										if(i==z||i==q||i==s||i==l)
											cout<<weight[i]<<" "<<i*10<<endl;
										else
											continue;
									}
								}
						}
				}
		}
	}
	return 0;
}
/*??????????????????????????????????????????????
 * ?????????????10????,??????????50???
 * ??????????????????????????;
 * ???????????????????????????????????????????
 * ?????????????????????????????????????????????????
 *????: 2012-10-16
 *??? ??
 */

int main()
{
	int z, q, s, l;
	for(z = 10; z <= 50; z += 10)    //??
		for(q = 10; q <= 50; q += 10)
			if(z != q)
			    for(s = 10; s <= 50; s += 10)
				    if(z != s && q != s)
				    	for(l = 10; l <= 50; l += 10)
				    		if(z != l && q != l && s != l)
				    			if((z + q == s + l) && ((z + l > q + s) && z + s < q))   // ??????
				    			{
				    				char rank[5] = {'\0', '\0', '\0', '\0', '\0'};
				    				rank[z / 10 - 1] ='z';
				    				rank[q / 10 - 1] ='q';
				    				rank[s / 10 - 1] ='s';
				    				rank[l / 10 - 1] ='l';
				    				for(int i = 4; i >= 0; i--)
				    					if(rank[i] > 97)
				    						cout << rank[i] << " " << (i + 1) * 10 << endl;
				    			}
	return 0;
}
int main ()
{
	int a[5] ;
	char b[5] ;
	b[1] = 'z'; b[2] = 'q' ; b[3] = 's' ; b[4] = 'l' ;
	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[3] + a[4]) && (a[1] + a[4]) > (a[3] + a[2]) && (a[1] + a[3]) < a[2] && a[1] != a[2] && a[1] != a[3] && a[1] != a[4] && a[2] != a[3] && a[2] != a[4] && a[3] != a[4])
					{
						for( int i = 5 ; i > 0 ; i --)
						{
							for( int j = 1 ; j <= 4 ; j ++)
							{
								if(a[j] == i)
									cout << b[j] << " " << a[j] * 10 << endl;
							}
						}
					}
				}
			}
		}
	}
	return 0 ;
}
int main()
{
	int a[4],b[4],T,i,j,c[4];
	for(a[0]=1;a[0]<6;a[0]++)
		for(a[1]=1;a[1]<6;a[1]++)
			for(a[2]=1;a[2]<6;a[2]++)
				for(a[3]=1;a[3]<6;a[3]++)
					if( (a[0]+a[1]==a[2]+a[3])+(a[0]+a[3]>a[1]+a[2])+(a[0]+a[2]<a[1])==3&&a[0]!=a[1]&&a[0]!=a[2]&&a[0]!=a[3]&&a[1]!=a[2]&&a[1]!=a[3]&&a[2]!=a[3])
					{	for(i=0;i<4;i++)
							c[i]=a[i];

						for(i=0;i<4;i++)
						{
							b[i]=a[i];
							for(j=i;j<4;j++)
								if(b[i]<a[j])
								{
									T=a[j];
									a[j]=b[i];
									b[i]=T;
								}
						}
						goto finish;
					}
finish:
	for(i=0;i<4;i++)
	{
		for(j=0;j<4;j++)
			if(b[i]==c[j])
			{
				if(j==0)
					cout<<"z "<<b[i]*10<<endl;
				else if(j==1)
					cout<<"q "<<b[i]*10<<endl;
				else if(j==2)
					cout<<"s "<<b[i]*10<<endl;
				else if(j==3)
					cout<<"l "<<b[i]*10<<endl;
				break;
			}
	}



					
					return 0;

}
int main()
{
	int z,q,s,l,i,j,a0,a[4];
	char b[4]={'z','q','s','l'},b0;
	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*10;
						a[1]=q*10;
						a[2]=s*10;
						a[3]=l*10;
						for(i=1;i<=4;i++)
						{
							for(j=0;j<4-i;j++)
							{
								if(a[j]>a[j+1])
								{
									a0=a[j];
									a[j]=a[j+1];
									a[j+1]=a0;
									b0=b[j];
									b[j]=b[j+1];
									b[j+1]=b0;
								}
							}
						}
					}
				}
			}
		}
	}
	for(i=3;i>=0;i--)
	{
		printf("%c %d\n",b[i],a[i]);
	}
	return 0;
}
int main(void)
{
	int z,q,s,l,i;
	for(z=50;z>0;z=z-10)
		for(q=50;q>0;q=q-10)
			for(s=50;s>0;s=s-10)
				for(l=50;l>0;l=l-10)
					if((z+q)==(s+l)&&(z+l)>(s+q)&&(z+s)<q&&z!=s&&z!=q&&z!=l&&q!=s&&q!=l&&s!=l)
						for(i=50;i>0;i=i-10)
						{
							if(i==z)
							printf("z %d\n",z);
							if(i==q)
							printf("q %d\n",q);
							if(i==s)
							printf("s %d\n",s);
							if(i==l)
							printf("l %d\n",l);
						}

					


	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 *= 10;
						q *= 10;
						s *= 10;
						l *= 10;
						cout << 'l' << ' ' << l << endl << 'q' << ' ' << q << endl << 'z' << ' ' << z << endl << 's' << ' ' << s;
					}
				}
			}
		}
	}
	return 0;
}
/*
 *  main.cpp
 *  Created on: 2012-10-1
 *      Author: ??
????????????????????????????????????????????????????????10???????????????50?????????????????????????????; ????????????????????????????????????????????????????????????????????????????????????????????
*/





int main()
{
	int a,b,c,d;
	
	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) && (a!=c) && (a!=d) && (b!=c) && (b!=d) && (c!=d))//????????
					    if ((a+b==c+d) + (a+d>b+c) + (a+c<b) ==3)
						{
						    if (a==5) cout <<"z 50" << endl;//???????????????????
							if (b==5) cout <<"q 50" << endl;
							if (c==5) cout <<"s 50" << endl;
							if (d==5) cout <<"l 50" << endl;
							if (a==4) cout <<"z 40" << endl;
							if (b==4) cout <<"q 40" << endl;
							if (c==4) cout <<"s 40" << endl;
							if (d==4) cout <<"l 40" << endl;
							if (a==3) cout <<"z 30" << endl;
							if (b==3) cout <<"q 30" << endl;
							if (c==3) cout <<"s 30" << endl;
							if (d==3) cout <<"l 30" << endl;
							if (a==2) cout <<"z 20" << endl;
							if (b==2) cout <<"q 20" << endl;
							if (c==2) cout <<"s 20" << endl;
							if (d==2) cout <<"l 20" << endl;
							if (a==1) cout <<"z 10" << endl;
							if (b==1) cout <<"q 10" << endl;
							if (c==1) cout <<"s 10" << endl;
							if (d==1) cout <<"l 10" << endl;

						}
	return 0;
}
int main()
{
    int z,q,s,l,i,j;
    int a[4],temp;
    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)
                   if(z+l>s+q)
                     if(z+s<q)//?????????????
                       if(z!=q&&z!=s&&z!=l)
                         if(q!=s&&q!=l)
                           if(s!=l)//?????????????????????????????
                             {
                                a[0]=z;
                                a[1]=q;
                                a[2]=s;
                                a[3]=l;//??????????
                            for(j=0;j<3;j++)
                                for(i=j+1;i<4;i++)
                                  {
                                      if(a[j]<a[i])
                                        {
                                          temp=a[j];
                                          a[j]=a[i];
                                          a[i]=temp;//???????
                                        }
                                  }
                                for(i=0;i<4;i++)
                                  {
                                      if(z==a[i])  cout<<"z"<<" "<<a[i]<<endl;//????????????????
                                      if(q==a[i])  cout<<"q"<<" "<<a[i]<<endl;
                                      if(s==a[i])  cout<<"s"<<" "<<a[i]<<endl;
                                      if(l==a[i])  cout<<"l"<<" "<<a[i]<<endl;
                                  }


                             }
             }
                             return 0;
}
int main()
{
	int a[4],i,j,temp;
	char b[4]={'z','q','s','l'},t;
	for (a[0]=10;a[0]<=50;a[0]=a[0]+10)
	{
		for (a[1]=10;a[1]<=50;a[1]=a[1]+10)
			for (a[2]=10;a[2]<=50;a[2]=a[2]+10)
				for (a[3]=10;a[3]<=50;a[3]=a[3]+10)
				{
					if (((a[0]+a[1])==(a[2]+a[3]))&&((a[0]+a[3])>(a[1]+a[2]))&&((a[0]+a[2])<a[1])&&(a[0]!=a[1])&&(a[0]!=a[2])&&(a[0]!=a[3])&&(a[1]!=a[2])&&(a[1]!=a[3])&&(a[2]!=a[3]))
					{
						for (i=0;i<4;i++)
						{
							for (j=0;j<4-i-1;j++)
							{
								if (a[j]<a[j+1])
								{
									temp=a[j];
									t=b[j];
									a[j]=a[j+1];
									b[j]=b[j+1];
									a[j+1]=temp;
									b[j+1]=t;
								}
							}
						}
						for (i=0;i<4;i++)
							cout<<b[i]<<' '<<a[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((s+l==z+q)+(z+l>s+q)+(z+s<q)==3)
	{
	   int a[4]={10000*z+'z',10000*q+'q',10000*s+'s',10000*l+'l'};
	int i,j,t;
	for(j=0;j<=3;j++)
		for(i=0;i<=3-j;i++)
			if(a[i]<a[i+1])
			{t=a[i];a[i]=a[i+1];a[i+1]=t;}
	 int b[4]={a[0]/1000,a[1]/1000,a[2]/1000,a[3]/1000};
	    cout<<(char)(a[0]%10000)<<" "<<b[0]<<'\n'
	        <<(char)(a[1]%10000)<<" "<<b[1]<<'\n'
	        <<(char)(a[2]%10000)<<" "<<b[2]<<'\n'
	        <<(char)(a[3]%10000)<<" "<<b[3]<<'\n';
	break;
	}
		       }

    return 0;

}
int main()
{
	int z, q, s, l, i;
	char a[6] = {0};
	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)
					{
						a[5-z] = 'z';
						a[5-q] = 'q';
						a[5-s] = 's';
						a[5-l] = 'l';
						for(i = 0; i < 5; i++)
							if(a[i] != 0)
								cout << a[i] << ' ' << (5 - i)*10 << endl;
					}
				}
	return 0;
}
int main()
{
	int z,q,s,l;
	z=20;
s=10;
l=50;
q=40;
cout << "l" << " "  <<l <<endl;
 cout << "q" << " "  <<q <<endl;
					 cout << "z" << " "  <<z <<endl;

					 

					   cout << "s" << " "  <<s <<endl;

					    
 
return 0;
}
int main()
{
   int s[4];                                            //s[4]????????s[0]s[1]s[2]s[3]???Z,Q,S,L??? 
   for(s[0]=10;s[0]<=50;s[0]=s[0]+10) 
   {
       for(s[1]=10;s[1]<=50;s[1]=s[1]+10) 
       {
                 for(s[2]=10;s[2]<=50;s[2]=s[2]+10) 
                  {
                              for(s[3]=10;s[3]<=50;s[3]=s[3]+10) 
                                    {
                                        if((s[0]+s[1]==s[2]+s[3])&&(s[0]+s[3]>s[2]+s[1])&&(s[0]+s[2]<s[1]))
                                        goto loop;
                                    }        
                  }                     
       }                               
   }
loop: {
      if(s[0]==50)
      cout<<"z "<<s[0]<<endl;
      if(s[1]==50)
      cout<<"q "<<s[1]<<endl;
      if(s[2]==50)
      cout<<"s "<<s[2]<<endl;
      if(s[3]==50)
      cout<<"l "<<s[3]<<endl;
      if(s[0]==40)
      cout<<"z "<<s[0]<<endl;
      if(s[1]==40)
      cout<<"q "<<s[1]<<endl;
      if(s[2]==40)
      cout<<"s "<<s[2]<<endl;
      if(s[3]==40)
      cout<<"l "<<s[3]<<endl;
      if(s[0]==30)
      cout<<"z "<<s[0]<<endl;
      if(s[1]==30)
      cout<<"q "<<s[1]<<endl;
      if(s[2]==30)
      cout<<"s "<<s[2]<<endl;
      if(s[3]==30)
      cout<<"l "<<s[3]<<endl;
      if(s[0]==20)
      cout<<"z "<<s[0]<<endl;
      if(s[1]==20)
      cout<<"q "<<s[1]<<endl;
      if(s[2]==20)
      cout<<"s "<<s[2]<<endl;
      if(s[3]==20)
      cout<<"l "<<s[3]<<endl;
      if(s[0]==10)
      cout<<"z "<<s[0]<<endl;
      if(s[1]==10)
      cout<<"q "<<s[1]<<endl;
      if(s[2]==10)
      cout<<"s "<<s[2]<<endl;
      if(s[3]==10)
      cout<<"l "<<s[3]<<endl;
      }
return 0;
}
int main()
{
	int weight;
	char name[4] = { 'z' , 'q' , 's' , 'l' };
	for ( int i = 1 ; i <= 5 ; i ++ )
	{
		for ( int j = 1 ; j <= 5 ; j ++ )
		{
			if ( j == i ) continue;
			for ( int k = 1 ; k <= 5 ; k ++ )
			{
				if ( k == i || k == j ) continue;
				for ( int l = 1 ; l <= 5 ; l ++ )
				{
					if ( l == i || l == j || l == k ) continue;
					if ( ( i + j ) == ( k + l ) && ( i + l ) > ( j + k ) && ( i + k ) < j )
					{
						for ( int m = 5 ; m >= 1 ; m -- )
						{
							if ( i == m )
								cout << "z " << 10 * m << endl;
							if ( j == m )
								cout << "q " << 10 * m << endl;
                            if ( k == m )
								cout << "s " << 10 * m << endl;
                            if ( l == m )
								cout << "l " << 10 * m << endl;
						}
					}
				}
			}
		}
	}
	return 0;
}