semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
struct person{
	char name;
	int weight;
}p[4];

//p0=z p1=q p2=s p3=l

int check(int a,int b,int c,int d){
	if(a!=b&&a!=c&&a!=d&&b!=c&&b!=d&&c!=d){
		return 1;
	}else{
		return 0;
	}
}

void main(){
	int i,j,tempw;
	char tempc;
	p[0].name='z';
	p[1].name='q';
	p[2].name='s';
	p[3].name='l';
	for(p[0].weight=10;p[0].weight<=50;p[0].weight=p[0].weight+10){
		for(p[1].weight=10;p[1].weight<=50;p[1].weight=p[1].weight+10){
			for(p[2].weight=10;p[2].weight<=50;p[2].weight=p[2].weight+10){
				for(p[3].weight=10;p[3].weight<=50;p[3].weight=p[3].weight+10){
					if(check(p[0].weight,p[1].weight,p[2].weight,p[3].weight)){
						if((p[0].weight+p[1].weight==p[2].weight+p[3].weight)&&(p[0].weight+p[3].weight>p[1].weight+p[2].weight)&&(p[0].weight+p[2].weight<p[1].weight)){
							for(i=3;i>0;i--){
								for(j=0;j<i;j++){
									if(p[j].weight<p[j+1].weight){
										tempw=p[j].weight;
										p[j].weight=p[j+1].weight;
										p[j+1].weight=tempw;
										tempc=p[j].name;
										p[j].name=p[j+1].name;
										p[j+1].name=tempc;
									}
								}
							}
							for(i=0;i<4;i++){
								printf("%c %d\n",p[i].name,p[i].weight);
							}
						}
					}
				}
			}
		}
	}
}
int main()
{
 int a[4];
 char n[4]={'z','q','s','l'};
 for(a[0]=10;a[0]<=50;a[0]+=10)
  for(a[1]=10;a[1]<=50;a[1]+=10)
   if(a[1]!=a[0])
   for(a[2]=10;a[2]<=50;a[2]+=10)
    if(a[2]!=a[1]&&a[2]!=a[0])
    for(a[3]=10;a[3]<=50;a[3]+=10)
     if(a[3]!=a[0]&&a[3]!=a[1]&&a[3]!=a[2])
      if(a[0]+a[1]==a[2]+a[3]&&a[0]+a[3]>a[2]+a[1]&&a[0]+a[2]<a[1])
      {
       for(int i=0;i<3;i++)
        for(int j=i+1;j<4;j++)
         if(a[i]<a[j])
         {
          int t;char c;
          t=a[i];a[i]=a[j];a[j]=t;
          c=n[i];n[i]=n[j];n[j]=c;
         }
       for(int i=0;i<4;i++)
        cout<<n[i]<<' '<<a[i]<<endl;
      }
 return 0;
}
int main()
{
    for(int z=1;z<=5;z++)
     for(int q=1;q<=5;q++)
     if(q!=z)
      for(int s=1;s<=5;s++)
      if(s!=z&&s!=q)
       for(int l=1;l<=5;l++)
       if(l!=z&&l!=q&&l!=s&&z+q==s+l&&z+l>s+q&&z+s<q)
        {int N[4]={z,q,s,l},t;
        char M[5]={'z','q','s','l',' '};
        for(int i=0;i<=3;i++)
        for(int j=i+1;j<=3;j++)
        {
            if(N[j]>N[i])
            {t=N[i];N[i]=N[j];N[j]=t;
            M[4]=M[i];M[i]=M[j];M[j]=M[4];};
        }
        cout<<M[0]<<" "<<10*N[0]<<endl;
        cout<<M[1]<<" "<<10*N[1]<<endl;
        cout<<M[2]<<" "<<10*N[2]<<endl;
        cout<<M[3]<<" "<<10*N[3]<<endl;}
    return 0;
}
int main()
{
    int z,q,s,l,a[4];
	char  name[4]={'z','q','s','l'};
	for(z=1; z<=5;z++)
	{
		for(q=1; q<=5; q++)
		{
			if(q==z)
				continue;
			else
			{
				for(s=1; s<=5; s++)
				{
					if(s==z||s==q||z+s>=q)
						continue;
					else 
					{
						for(l=1; l<=5;l++)
						{
							if(l==z||l==q||l==s||z+q!=s+l||z+l<=s+q)
								continue;
							else if(l!=z&&l!=q&&l!=s&&z+q==s+l&&z+l>s+q)
							{
								int k, i, t, max=0;
								char char1;
								a[0]=z;a[1]=q;a[2]=s;a[3]=l;
								for(k=0;k<4;k++)
								{ 
									for(i=3-k;i>0;i--)
									{
										if(a[i-1]<a[i])
										{
											t = a[i-1];
											a[i-1] = a[i];
											a[i] = t;
											char1 = name[i-1];
											name[i-1] = name[i];
											name[i] = char1;
										}
									}

								}
								for(k=0;k<4;k++)
									cout<<name[k]<<' '<<a[k]*10<<endl;

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

	for (q =4;q <=5;q++)
		{
			for (z = 1; z <= 5;z++)
		{
			if (z == q) continue;
			for (s = 1; s <= 5;z++)
			{
				if (s == q||s == z) continue;
				 l = z+ q -s;
					if (l == q||l == z|| l==s) continue;
					if (z + q == s+ l&&z + l > s+ q && z + s < q)
						{
							if(l==5)
							{cout <<"l "<< 10 * l <<endl;
					cout <<"q "<< 10 * q <<endl;
					cout <<"z "<< 10 * z <<endl;
					cout <<"s "<< 10 * s <<endl;}
							else
								{cout <<"q "<< 10 * q <<endl;
					cout <<"l "<< 10 * l <<endl;
					cout <<"s "<< 10 * s <<endl;
					cout <<"z "<< 10 * z <<endl;}

				
			}
			}
	}
	}
	return 0;
}
int main()
{
	int i,j,k,z,q,s,l,m;
	int a[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)&&(z!=s)&&(z!=l)&&(q!=s)&&(q!=l)&&(s!=l)&&(z+q==s+l)&&(z+l>s+q)&&(z+s<q))
					{
						a[1]=z;a[2]=q;a[3]=s;a[4]=l;
						for (i=1;i<=3;i++)
						{
						    k=a[i];m=i;	
							for(j=i;j<=4;j++)
							{
								if (a[j]>k){k=a[j];m=j;}

							}
							k=a[i];a[i]=a[m];a[m]=k;
						}
                        for(i=1;i<=4;i++)
						{
							if (a[i]==z) cout<<"z ";
                            if (a[i]==q) cout<<"q ";
							if (a[i]==s) cout<<"s ";
							if (a[i]==l) cout<<"l ";
							cout<<a[i]*10<<endl; 
						}
						return 0;
					}
						
				}
	return 0;
}
int main()
{ int z =10,q=10,s=10,l=10 ;
  int qq[5];int terp;
  qq[0]=z ,qq[1]=q,qq[2]=s,qq[3]=l;
  int i=1 ,j=1,k=1,v=1 ;
  z=i*10 ;q=j*10 ;s=k*10;l=v*10;
  for(;i<6;i++) 
      for(;j<6;j++)
        for(;k<6;k++)
           for(;v<6;v++)
               if( z + q - s - l == 0)
                  if( z + l > s + q)
                	 if(z + s < q )
						 
						 cout << endl;
					     cout << 'l' <<' '<<50<<endl;
                         cout << 'q' <<' '<<40<<endl;
		                 cout << 'z' <<' '<<20<<endl;
					     
						 cout << 's' <<' '<<s<<endl;
						
						 return 0;
}
int main()
{
    int z,q,s,l,a1,b2,c3,i;
    
    for(z=10;z<60;z=z+10)
        for(q=10;q<60;q=q+10)
          
	        for(s=10;s<60;s=s+10)
                 
		       for(l=10;l<60;l=l+10)
			   {
		      
                            a1=(z+q==s+l);
                            b2=((z+l)>(s+q));
                            c3=((z+s)<q);
                            if(a1+b2+c3==3)
                            {
                              if(z!=q&&z!=s&&z!=l&&q!=s&&q!=l&&s!=l)
                                {for(i=50;i>=10;i=i-10)
                                  {
                                      if(z==i) cout<<"z"<<' '<<z<<endl;
                                      if(q==i) cout<<"q"<<' '<<q<<endl;
                                      if(s==i) cout<<"s"<<' '<<s<<endl;
                                      if(l==i) cout<<"l"<<' '<<l<<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;      //????????
               }
          }
     }
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;
}

//????????
main()
{
    char a[6]={'0','0','0','0','0','0'};
    int z,q,s,l,i;

    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[z]='z';
                         a[q]='q';
                         a[s]='s';
                         a[l]='l';
                         for(i=5;i>0;i--)
                         {
                             if(a[i]!='0')
                             {
                                 printf("%c %d0\n",a[i],i);
                             }
                         }
                    }
                }
            }
        }
    }
}
/*
 * chengtizhong.cpp
 *
 *  Created on: 2012-10-22
 *      Author: 1200012791??
 *      ???????????????????????????????????????????????
 */
int main(){
	int a=0,b=0,c=0,d=0,i=0; //??5???????????0
	int x[7]; //???????7?????
	char y[4]; //???????4??????
	x[0]=0; //?a[0]???0
	x[1]=0; //?a[1]???0
	x[2]=0; //?a[2]???0
	for(a=0;a<=50;a+=10){ //a???????????
		for(b=10;b<=50;b+=10){ //b???????????
			if(b!=a){ //??b?????a???
			    for(c=10;c<=50;c+=10){ //c???????????
				    if(c!=a&&c!=b){ //??c?????a?b???
			    	    for(d=10;d<=50;d+=10){ //d???????????
					        if(d!=a&&d!=b&&d!=c&&(a+b)==(c+d)&&(a+d)>(b+c)&&a+c<b){ //??d?????a?b?c???????????
						        for(i=3;i<7;i++){ //????
							        x[i]=0; //x[i]???0
							        if(x[i-1]!=a&&x[i-2]!=a&&x[i-3]!=a){ //?????????
							        	x[i]=a; //a???x[i]
							            y[i]='z'; //z???y[i]
							        }
						            if(x[i]<b&&x[i-1]!=b&&x[i-2]!=b&&x[i-3]!=b){ //??????????x[i]??b
							            x[i]=b; //b???x[i]
							            y[i]='q'; //'q'???y[i]
						            }
						            if(x[i]<c&&x[i-1]!=c&&x[i-2]!=c&&x[i-3]!=c){ //??????????x[i]??c
							            x[i]=c; //c???x[i]
							            y[i]='s'; //'s'???y[i]
						            }
						            if(x[i]<d&&x[i-1]!=d&&x[i-2]!=d&&x[i-3]!=d){ //??????????x[i]??d
							            x[i]=d; //d???x[i]
							            y[i]='l'; //'l'???y[i]
						            }
    					            cout<<y[i]<<' '<<x[i]<<endl; //??y[i] x[i]
						        }
					        }
						}
					}
				}
			}
		}
	}
	return 0;
}
int main()
{
	int z=10,q=10,s=10,l=10,i=0;
	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>s+q)+(z+s<q)==3)
					{
						char rank[6]={' ',' ',' ',' ',' ',' '};
						rank[z/10]='z';
						rank[q/10]='q';
						rank[s/10]='s';
						rank[l/10]='l';
						for (i=5;i>=0;i--)
						{
							if (rank[i]==' ') continue;
							cout<<rank[i]<<" "<<i*10<<endl;
						}
					}
				}
			}
		}
	}
	return 0;
}
int main()
{
	int z,q,s,l,i;
	char name[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==s+l && z+l>s+q && z+s<q && (z-q)*(z-s)*(z-l)*(q-s)*(q-l)*(s-l)!=0)
					{
						name[z]='z';
						name[q]='q';
						name[s]='s';
						name[l]='l';
					}
				}
				
			}
		
		}
	}
	for (i=5;i>=1;i--)
		if (name[i]!='0') cout<<name[i]<<' '<<i*10<<endl;
	return 0;
}
int main(int argc)
{ int i,a,b,c,d;
   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&&b!=c&&c!=d&&a!=c&&a!=d&&b!=d&&(a+b)==(c+d)&&(a+d)>(b+c)&&(a+c)<b)
   {cout<<"l"<<" "<<d<<endl;
   cout<<"q"<<" "<<b<<endl;
   cout<<"z"<<" "<<a<<endl;   
	cout<<"s"<<" "<<c<<endl;
	}}}}}
	return 0;
}
int main()
{
	int z , q , s , l , max = 0;
	int weight[4] , pos;
	char num[4] = {'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 == l + s) && ((z + l) > (s + q)) && (z + s) < q)
					{
						weight[0] = z;
						weight[1] = q;
						weight[2] = s;
						weight[3] = l;
					}
	for (int i = 0; i < 4; i ++)
	{
		for (int j = 0; j < 4; j ++)
			if (weight[j] > max)
			{
				max = weight[j];
				pos = j;
			}

		cout << num[pos] << " " << max << endl;
		max = 0;
		weight[pos] = 0;
	}

	return 0;
}
int main()
{
	int z, q, s, l;
	for (z = 10; z <= 50; z += 10)
		for (q = 10; q <= 50; q += 10)
		{
			if (z == q) continue;
			for (s = 10; s <= 50; s += 10)
			{
				if (z == s || q == s) continue;
				for (l = 10; l <= 50; l += 10)
				{
					if (z == l || s == l || q == l) continue;
					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))
                  {
                       int a[4] = {z, q, s, l}, b[4] ={z, q, s, l}, i, j, k, p;
                       char c[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 + 1] = p;
                                 }
                             }
                         }

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

                        }
                    }
               }
      return 0;
}
int main() {
	int A,B,C,D,a,b,c,d;
	int e[4],i,j,k=0;
	for(A=10;A<=50;A=A+10)
		for(B=10;B<=50;B=B+10)
		{	if(A==B)continue;
			for(C=10;C<=50;C=C+10)
			{	  if(A==C||B==C)continue;
				for(D=10;D<=50;D=D+10)
				{if(A==D||B==D||C==D)continue;
				if((A+B==C+D)&&(A+D>B+C)&&(A+C<B))//??ABCD??
	{e[0]=A;
	 e[1]=B;
	 e[2]=C;
	 e[3]=D;//??????
	 a=A;
	 b=B;
	 c=C;
	 d=D;//??????
	 }
				}
			}
		}
	for(k=1;k<4;k++)
	   for(i=1;i<4;i++)
		{
		if (e[i]>e[i-1])
		{j=e[i-1];e[i-1]=e[i];e[i]=j;
	        }

		}//??e??????
    for(i=0;i<4;i++)
    	{
    	if(e[i]==a)
    	    cout<<"z "<<e[i]<<endl;
        if(e[i]==b)
        	cout<<"q "<<e[i]<<endl;
        if(e[i]==c)
            cout<<"s "<<e[i]<<endl;
        if(e[i]==d)
            cout<<"l "<<e[i]<<endl;//abcd???????ABCD??????????
    	}

	return 0;
}
int main()
{
	int z, q, s, l;
	for (z = 10; z <= 50; z += 10)
	{
		for (q = 10; q <= 50; q += 10)
		{
			if (z == q)
				continue;
			for (s = 10; s <= 50; s += 10)
			{
				if (s == z || s == q)
					continue;
				for (l = 10; l <= 50; l++)
				{
					if (l == z || l == s || l == q)
						continue;
					if (z + q == s + l && z + l > s + q && z + s < q)
						cout << 'l' << ' ' << l << endl 
						<< 'q' << ' ' << q << endl
						<< 'z' << ' ' << z << endl
						<< 's' << ' ' << s <<endl; 
				}
			}
		}
	}
	return 0;
}
int main()
{
	int a[4],b,c,d;
	char al[4]={'z','q','s','l'};
	char e;
	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[0]!=a[2]&&a[0]!=a[3]&&a[1]!=a[2]&&a[1]!=a[3]&&a[2]!=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])
						{
							for(b=0;b<4;b++)
							{
								for(c=0;c<3-b;c++)
								{
									if(a[c]<a[c+1])
									{
										d=a[c];
										e=al[c];
										a[c]=a[c+1];
										al[c]=al[c+1];
										a[c+1]=d;
										al[c+1]=e;
									}
								}
							}
							for(b=0;b<4;b++)
							{
								cout<<al[b]<<' '<<10*a[b]<<endl;
							}
						}
					}
				}
			}
		}
	}
	return 0;
}
int main()
{
	int a[4], z, q, s, l, i, j, k, m;
	for(i = 1; i < 6; i++)
		for(j = 1; j < 6; j++)
			if(j != i)
				for(k = 1; k < 6; k++)
					if(k != i && k != j)
						for(m = 1; m < 6; m++)
							if(m != k && m != i && m != j)
							{
								a[0] = 10 * i;
								a[1] = 10 * j;
								a[2] = 10 * k;
								a[3] = 10 * m;
								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 < 4; i++)
										if(a[i] == 50)
										{
											if(i == 0)
												cout << "z" << " " << "50" << endl;
											if(i == 1)
												cout << "q" << " " << "50" << endl;
											if(i == 2)
												cout << "s" << " " << "50" << endl;
											if(i == 3)
												cout << "l" << " " << "50" << endl;
										}
									for(i = 0; i < 4; i++)
										if(a[i] == 40)
										{
											if(i == 0)
												cout << "z" << " " << "40" << endl;
											if(i == 1)
												cout << "q" << " " << "40" << endl;
											if(i == 2)
												cout << "s" << " " << "40" << endl;
											if(i == 3)
												cout << "l" << " " << "40" << endl;
										}
									for(i = 0; i < 4; i++)
										if(a[i] == 30)
										{
											if(i == 0)
												cout << "z" << " " << "30" << endl;
											if(i == 1)
												cout << "q" << " " << "30" << endl;
											if(i == 2)
												cout << "s" << " " << "30" << endl;
											if(i == 3)
												cout << "l" << " " << "30" << endl;
										}
									for(i = 0; i < 4; i++)
										if(a[i] == 20)
										{
											if(i == 0)
												cout << "z" << " " << "20" << endl;
											if(i == 1)
												cout << "q" << " " << "20" << endl;
											if(i == 2)
												cout << "s" << " " << "20" << endl;
											if(i == 3)
												cout << "l" << " " << "20" << endl;
										}
									for(i = 0; i < 4; i++)
										if(a[i] == 10)
										{
											if(i == 0)
												cout << "z" << " " << "10" << endl;
											if(i == 1)
												cout << "q" << " " << "10" << endl;
											if(i == 2)
												cout << "s" << " " << "10" << endl;
											if(i == 3)
												cout << "l" << " " << "10" << 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;
   return 0;
}
///////////////////////
//??????       //
//??????       //
//???1200012823   //
//???2012?10?8?//
//????????   //
///////////////////////



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 ((q == s) || (z == 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)) // ????????
					{
						for (int i = 5; i > 0; i--) // ???????????
						{
							if (z == i) cout << "z " << z * 10 << endl;
							if (q == i) cout << "q " << q * 10 << endl;
							if (s == i) cout << "s " << s * 10 << endl;
							if (l == i) cout << "l " << l * 10 << endl;
						}
					}
				}
			}
		}
	}
					
	return 0;
}
int main(){
	cout<<"l"<<" "<<"50"<<'\n'
	    <<"q"<<" "<<"40"<<'\n'
	    <<"z"<<" "<<"20"<<'\n'
	    <<"s"<<" "<<"10"<<endl;
	    return 0;
}
main ()
{
int z,q,s,l,i,j,n;
int t[4]={1,2,3,4},u[4];
char x[4][10];
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)
                {
                u[0]=z;
                u[1]=q;
                u[2]=s;
                u[3]=l;
                t[0]=z;
                t[1]=q;
                t[2]=s;
                t[3]=l;
                }

            }
        }
    }
}

for (j=0;j<3;j++)
{
    for (i=0;i<3-j;i++)
    {
        if (u[i]<u[i+1])
        {n=u[i+1];u[i+1]=u[i];u[i]=n;}
    }

}
for (i=0;i<4;i++)
{
    for (j=0;j<4;j++)
    {
        if (t[j]==u[i])
        {
            switch (j)
            {
               case 0:printf("z %d\n",t[0]);break;
               case 1:printf("q %d\n",t[1]);break;
               case 2:printf("s %d\n",t[2]);break;
               case 3:printf("l %d\n",t[3]);break;
            }
        }
    }

}
//printf("%d %d %d %d",t[0],t[1],t[2],t[3]);
}
int main()
{
	int z, q, s, l, t, i;
	char name[6];
	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(l == z || l == q || l == s) continue;
					t = 0;
					t = (z + q == s + l) && (z + l > s + q) && (z + s < q);
					if (t == 1) break;
				}
            	if (t == 1) break;
			}
         	if (t == 1) break;
		}
        if (t == 1) break;
	}	
	for(i = 1; i <= 5; i ++)
		name[i] = ' ';
	name[z / 10] = 'z';
	name[q / 10] = 'q';
	name[s / 10] = 's';
	name[l / 10] = 'l';
    for(i = 5; i >= 1; i --)
		if(name[i] != ' ')
			cout << name[i] << ' ' << i * 10 <<endl;
	 
}
/*
 * 12.10.26.cpp
 *  Created on: 2012-10-26
 *  Author: ???
 *  ??:???
 */
int main() {
	int w[5], z, q, s, l, i, j, t;
	char n[5], 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) {
						w[1] = z;
						w[2] = q;
						w[3] = s;
						w[4] = l;
						n[1] = 'z';
						n[2] = 'q';
						n[3] = 's';
						n[4] = 'l';
						for (i = 1; i <= 4; i++)
							for (j = i + 1; j <= 4; j++) {
								if (w[i] < w[j]) {
									t = w[i];
									w[i] = w[j];
									w[j] = t;
									k = n[i];
									n[i] = n[j];
									n[j] = k;
								}
							}
						for (i = 1; i <= 4; i++)
									cout << n[i] << ' ' << w[i] * 10 << endl;
					}
	return 0;
}
int main ()
{
	int sum = 0;																	//?????? 
	char zz = 'z', qq = 'q', ss = 's', ll = 'l';									//?????????? 
	int z = 0, q = 0, s = 0, l = 0;													//??????? 
	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)
				{
					sum = ( z + q == s + l ) + ( z + l > s + q ) + ( z + s < q );
					if ( sum == 3 && z != q != s != l )
					{
						if ( z == 50 ) cout << zz << " " << z << endl;
						if ( q == 50 ) cout << qq << " " << q << endl;
						if ( s == 50 ) cout << ss << " " << s << endl;
						if ( l == 50 ) cout << ll << " " << l << endl;
						if ( z == 40 ) cout << zz << " " << z << endl;
						if ( q == 40 ) cout << qq << " " << q << endl;
						if ( s == 40 ) cout << ss << " " << s << endl;
						if ( l == 40 ) cout << ll << " " << l << endl;
						if ( z == 30 ) cout << zz << " " << z << endl;
						if ( q == 30 ) cout << qq << " " << q << endl;
						if ( s == 30 ) cout << ss << " " << s << endl;
						if ( l == 30 ) cout << ll << " " << l << endl;
						if ( z == 20 ) cout << zz << " " << z << endl;
						if ( q == 20 ) cout << qq << " " << q << endl;
						if ( s == 20 ) cout << ss << " " << s << endl;
						if ( l == 20 ) cout << ll << " " << l << endl;
						if ( z == 10 ) cout << zz << " " << z << endl;
						if ( q == 10 ) cout << qq << " " << q << endl;
						if ( s == 10 ) cout << ss << " " << s << endl;
						if ( l == 10 ) cout << ll << " " << l << endl;
					}
				}
	return 0;
}