semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	int z,q,s,l,m[4],max=0,i,j;
	char n[4][2]={"z","q","s","l"};
	for(z=1;z<6;z++)
	{
		for(q=1;q<6;q++)
		{
			if(q!=z)
			{
				for(s=1;s<6;s++)
				{
					if(s!=q&&s!=z)
					{
						for(l=1;l<6;l++)
						{
							if(l!=z&&l!=s&&l!=q)
							{
								if((z+q==s+l)&&((z+l)>(s+q))&&(z+s<q))
								{
									m[0]=z;
									m[1]=q;
									m[2]=s;
									m[3]=l;
									for(j=0;j<4;j++)
									{
										for(i=0;i<4;i++)
										{
											if(m[i]>m[max])
											{
												max=i;
											}
										}
											cout<<n[max]<<' '<<m[max]*10<<endl;
											m[max]=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&&z!=s&&z!=l&&q!=s&&q!=l&&s!=l)
					{
			         	if(z!=q&&z!=s&&q!=s)
						{
				     	if(((z+q)==(s+l))&&((z+l)>(s+q))&&((z+s)<q))
						{
				     		if(z==5)
					      		cout<<"z 50"<<endl;
					    	if(q==5)
						    	cout<<"q 50"<<endl;
					    	if(s==5)
						        cout<<"s 50"<<endl;
					     	if(l==5)
						     	cout<<"l 50"<<endl;
					     	if(z==4)
						    	cout<<"z 40"<<endl;
					     	if(q==4)
					 		cout<<"q 40"<<endl;
								if(s==4)
						        cout<<"s 40"<<endl;
					     	if(l==4)
						     	cout<<"l 40"<<endl;
						if(z==3)
							cout<<"z 30"<<endl;
						if(q==3)
							cout<<"q 30"<<endl;
						if(s==3)
						    cout<<"s 30"<<endl;
						if(l==3)
							cout<<"l 30"<<endl;
						if(z==2)
							cout<<"z 20"<<endl;
						if(q==2)
							cout<<"q 20"<<endl;
						if(s==2)
						    cout<<"s 20"<<endl;
						if(l==2)
							cout<<"l 20"<<endl;
						if(z==1)
							cout<<"z 10"<<endl;
						if(q==1)
							cout<<"q 10"<<endl;
						if(s==1)
						    cout<<"s 10"<<endl;
					     	if(l==1)
						    	cout<<"l 10"<<endl;
						}}
					}
				}
			}
		}
	}
	return 0;
}
int main()
{
	int w[ 4 ];
	char name[ 4 ] = {'z', 'q', 's', 'l'};
	int i, j;
	for ( w[z] = 10; w[z] <= 50; w[z]+= 10 )
	{

		for ( w[q] = 10; w[q] <= 50; w[q]+= 10 )
		{
			if ( w[q] == w[z] )
			{
				continue;
			}
			for ( w[s] = 10; w[s] <= 50; w[s]+= 10 )
			{
				if ( w[s] == w[z] || w[s] == w[q] )
				{
					continue;
				}
				for ( w[l] = 10; w[l] <= 50; w[l]+= 10 )
				{
					if ( w[l] == w[z] || w[l] == w[q] || w[l] == w[s] )
					{
						continue;
					}
					if ( ((w[z] + w[q]) == ( w[s] + w[l] )) && (( w[z] + w[l] ) >( w[s] + w[q] )) && (( w[z] + w[s] )< w[q]))
					{
						for ( i = 50; i >= 10; i= i - 10 )
						{
							for ( j = 0; j < 4; j++ )
							{
								if ( w[ j ] == i )
								{
									cout << name[ j ] << " " << w[ j ] << endl;
								}
							}
						}
					}
				}
			}
		}
	}
	return 0;

}
//============================================================================
// Name        : national8.cpp
// Author      : 1300012911
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================


int main() {
	int weight[6];  //??
	char name[6];   //??????
	int z,q,s,l,i,renshu;  //z,q,s,l:??????
	for (i = 1;i <= 5;i++) {weight[i] = i*10;name[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) && (z != s) && (q != s)
						&& (z != l) && (q != l) && (s != l))  //????
					{
						if ( ((weight[z]+weight[q]) == (weight[s]+weight[l]))
								&& ((weight[z]+weight[l]) > (weight[s]+weight[q]))
								&& ( (weight[z]+weight[s]) < weight[q]) )
							//???????
						{
							name[z] = 'z';  //??????
							name[q] = 'q';
							name[s] = 's';
							name[l] = 'l';
							renshu = 0; //??????
							for (i = 5;i >= 1;i--) //??
								{
								  if ( name[i] != ' ' )
									  {
									     renshu++;
									     if (renshu < 4)
									    cout << name[i] << ' ' << weight[i] << endl;
									     else cout << name[i] << ' ' << weight[i];
									  }else;
								}
						}else;
					}else;
				}
	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)//????
					{
						int a[5]={0};//????????int?????
						char b[5];//??char????????????
					    a[1]=z;
						b[1]='z';
						a[2]=q;
						b[2]='q';
						a[3]=s;
						b[3]='s';
					    a[4]=l;
						b[4]='l';
						int i,j,p;//?????????????????????
						char k;//??
						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;
								k=b[i];
								b[i]=b[i+1];
								b[i+1]=k;
							   }

						   }

						 }
					
					    for(int i=1;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++)//??????????
			{
				l=(z+q)-s;//????????????????
				if ((l>=1)&&(l<=5)&&(z+l>s+q)&&(z+s<q))//?????????10-50????????????????
				{
					int a[4],i,j,k,temp;
					char c[4],ch;
					a[0]=z;a[1]=q;a[2]=s;a[3]=l;
					c[0]='z';c[1]='q';c[2]='s';c[3]='l';//?????????
					for (i=0;i<4;i++)
					{
						k=i;
						for (j=i+1;j<4;j++)
							if (a[j]>a[k])
								k=j;
					    if (k!=i)
						{
							temp=a[k];
							a[k]=a[i];
							a[i]=temp;
							ch=c[k];
							c[k]=c[i];
							c[i]=ch;
						}//?????????
					}//??????
					for (i=0;i<4;i++)
						cout <<c[i]<<' '<<a[i]<<0<<endl;//??
				}
			}

	return 0;
}
//*********************************************************************
//*????weight.cpp                                                 *
//*?  ??spica                                                      *
//*?????2011?11?                                               *
//*????:????????????????????????????  *
//*********************************************************************
int main()
{
	int z=0,q=0,s=0,l=0,w=0;    //??????????z,q,s,l???????w
	int i=0,j=0;                //??????i,j6
	char weight[6];     //??????weight[]        
	for(i=1;i<=5;i++)   //??????????
	{
		weight[i]=' ';
	}
	for(z=1;z<=5;z++)   //z???15??
	{
		for(q=1;q<=5;q++)//q???15??
		{
			if(z==q)    //z=q,??
				continue;
			for(s=1;s<=5;s++)//s?15??
			{
				if(z==s||q==s)//z=s?q=s,??
					continue;
				for(l=1;l<=5;l++)//l?15??
				{
					if(z==l||s==l||q==l)//z=l?q=l?s=l??
						continue;
					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(j=5;j>=1;j--)  //??????????
						{
							if(weight[j]!=' ')
							{
								w=j*10;
								cout<<weight[j]<<" "<<w<<endl;
							}
						}
					}
				}
			}
		}
	}
	return 0;
}
int main()
{
	int i=0,j=0,x=0,y=0,z=0,q=0,s=0,l=0;
	for(i=1;i<6;i++)
	{
			z=10*i;
		for(j=1;j<6;j++)
		{
			q=10*j;
			for(x=1;x<6;x++)
			{	
				s=10*x;
				for(y=1;y<6;y++)
				{
					l=10*y;
					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 iz,iq,is,il,z,q,s,l;
	for(iz=10;iz<=50;iz+=10)
	
		for(iq=10;iq<=50;iq+=10)
		
			for(is=10;is<=50;is+=10)
			
				for(il=10;il<=50;il+=10)
				
					if((iz+iq==is+il)&&(iz+il>iq+is)&&(iz+is<iq))
					{
						z=iz;
						q=iq;
						s=is;
						l=il;
						break;
					}
	
	printf("l %d\n",l);
	printf("q %d\n",q);
	printf("z %d\n",z);
	printf("s %d\n",s);
    return 0;
}
/************************************************************
 * 03.cpp													*
 *															*
 *  Created on: 2010-11-20									*
 *      Author: ??										*
 ************************************************************/
int main()
{
	int z,q,s,l;									//????????
	char m[6];										//??????
	int j;
	for(j=0;j<6;j++)
	{
		m[j]='a';                                   //??????????????????
	}
	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))
					{
						m[z/10]='z';				//??????10??????????10?????????????????????
						m[q/10]='q';
						m[s/10]='s';
						m[l/10]='l';
					}
					int i;
					for(i=5;i>0;i--)
					{
						if(m[i]=='a')
						{
							continue;
						}
						else
						{
							cout<<m[i]<<" "<<i*10<<endl;				//?????????????????
							m[i]='a';
						}
					}
				}
			}
		}
	}
	return 0;
}
int main()
{
	int a[4],sum=0,i=0,k=0;  //????a[4]???????????sum????????i,k??????
	char rank[4];  //?????rank[4]?????????????????
	rank[0]='z';
	rank[1]='q';
	rank[2]='s';
	rank[3]='l';
	for(a[0]=1;a[0]<=5;a[0]++)
	{
		for(a[1]=1;a[1]<=5;a[1]++)
		{
			if(a[0]==a[1])
				continue;
			for(a[2]=1;a[2]<=5;a[2]++)
			{
				if(a[0]==a[2]||a[1]==a[2])
				    continue;
				for(a[3]=1;a[3]<=5;a[3]++)
				{
					if(a[0]==a[3]||a[1]==a[3]||a[2]==a[3])
				        continue;
					sum=((a[0]+a[1])==(a[2]+a[3]))+((a[0]+a[3])>(a[1]+a[2]))+((a[0]+a[2])<a[1]);
					if(sum==3)
					{
						for(k=5;k>0;k--)
						{
							for(i=0;i<4;i++)
							{
								if(a[i]==k)
									cout<<rank[i]<<' '<<a[i]*10<<endl;
							}
						}
					}
				}
			}
		}
	}
	cin.get();cin.get();
	return 0;
}
int main()
{
	int year[4],f=0,s=0,t=0,fo=5;
	char p[4]={'z','q','s','l'};                                                    //???????
	for (int a=1;a<=5;a++)
	{
		for (int b=1;b<=5;b++) 
		{
			for (int c=1;c<=5;c++)
			{
				for (int d=1;d<=5;d++)
				{
					{
					if (a+b==c+d && a+d>b+c && a+c<b)
					{year[0]=a;year[1]=b;year[2]=c;year[3]=d;}
					}
				}
			}
	    }
	}
	for (int i=0;i<=3;i++)                                                     //????
	{
		if (f<year[i]) f=year[i];
	}
	for (int i=0;i<=3;i++)
	{
		if (s<year[i] && year[i]!=f) s=year[i];
	}
	for (int i=0;i<=3;i++)
	{
		if (t<year[i] && year[i]!=s && year[i]!=f) t=year[i];
	}
	for (int i=0;i<=3;i++)
	{
		if (fo>year[i]) fo=year[i];
	}
	for (int i=0;i<=3;i++)                                                      //??
	{
		if (year[i]==f) cout <<p[i] <<" " <<year[i]*10 <<endl;
	}
	for (int i=0;i<=3;i++)
	{
		if (year[i]==s) cout <<p[i] <<" " <<year[i]*10 <<endl;
	}
	for (int i=0;i<=3;i++)
	{
		if (year[i]==t) cout <<p[i] <<" " <<year[i]*10 <<endl;
	}
	for (int i=0;i<=3;i++)
	{
		if (year[i]==fo) cout <<p[i] <<" " <<year[i]*10 <<endl;
	}
	
	return 0;
}
int main()
{
	int z, q, s, l;
	int w[4];
	char ch[4];
	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))
					{
						w[(z > q) + (z > s) + (z > l)] = z * 10;
						w[(q > z) + (q > s) + (q > l)] = q * 10;
						w[(s > z) + (s > q) + (s > l)] = s * 10;
						w[(l > z) + (l > q) + (l > s)] = l * 10;
						ch[(z > q) + (z > s) + (z > l)] = 'z';
						ch[(q > z) + (q > s) + (q > l)] = 'q';
						ch[(s > z) + (s > q) + (s > l)] = 's';
						ch[(l > z) + (l > q) + (l > s)] = 'l';
						cout << ch[3] << " " << w[3] << endl;
						cout << ch[2] << " " << w[2] << endl;
						cout << ch[1] << " " << w[1] << endl;
						cout << ch[0] << " " << w[0] << endl;
					}
				}
			}
		}
	}
	return 0;
}
int main()
{
	char b[4] = { 'z', 'q', 's','l'};
	int a[4], j, i;
	for(a[0] = 10; a[0] <= 50; a[0] += 10)
		for(a[1] = 10; a[1] <= 50; a[1] += 10)
		{
			if(a[0] == a[1])continue;
			for(a[2] = 10; a[2] <= 50; a[2] += 10)
			{
				if(a[2] == a[1] || a[2] == a[0])continue;
				for(a[3] = 10; a[3] <= 50; a[3] += 10)
				{
					if(a[3] == a[0] || a[3] == a[1] || a[2] == a[3])continue;
					if(a[0] + a[1] == a[2] + a[3] && a[0] + a[3] > a[1] + a[2] && a[0] + a[2] < a[1])
						for(i = 50; i >= 10; i -= 10)
							for(j = 0; j <= 3; j++)
								if(a[j] == i)
									cout << b[j] << ' ' << i << endl;
				}
			}
		}
	return 0;
}
int main()
{
    int z,q,s,l;//???????? 
    int word[3];//???????? 
    char rank[6];//???? 
    for(int i=0;i<6;i++)
    {
           rank[i]='\0';//?rank??? 
    } 
    for(z=1;z<=5;z++)//????????????????????? 
    { 
        for(q=1;q<=5;q++)
        {
            if(q==z)
            continue; 
            for(s=1;s<=5;s++)
            {
                 if((s==q)||(s==z))
                 continue; 
                 for(l=1;l<=5;l++)
                 {
                     if((l==z)||(l==q)||(l==s))
                     continue;
                     else
                     {
                         word[0]=((z+q)==(s+l));
                         word[1]=((z+l)>(s+q));
                         word[2]=((z+s)<q);
                         if(word[0]+word[1]+word[2]==3)//???????? 
                         {
                             rank[6-z]='z';//???? 
                             rank[6-q]='q';
                             rank[6-s]='s';
                             rank[6-l]='l';
                         } 
                     } 
                 } 
            } 
        } 
    } 
    for(int i=1;i<=5;i++)//?? 
    {
            if(rank[i]=='\0')
            continue;
            else
            cout<<rank[i]<<' '<<10*(6-i)<<endl;
    }
    return 0;
}
int main()
{
	int z,q,s,l,shu[3],pai[6]={0},i;
	char zi[6]={' '};
for(z=1;z<=5;z++){
	for(q=1;q<=5;q++){
		for(s=1;s<=5;s++){
			for(l=1;l<=5;l++){
				shu[0]=(z+q)==(s+l);
				shu[1]=(z+l)>(s+q);
				shu[2]=(z+s)<q;
				if(shu[0]+shu[1]+shu[2]==3&&z!=q&&z!=s&&z!=l&&q!=s&&q!=l&&s!=l){
				pai[z]=z*10;
				pai[q]=q*10;
				pai[s]=s*10;
				pai[l]=l*10;
				zi[z]='z';
				zi[q]='q';
				zi[s]='s';
				zi[l]='l';
				for(i=5;i>=1;i--){
					if(pai[i]!=0)cout<<zi[i]<<' '<<pai[i]<<endl;}

				}

			}
		}
	}
}
return 0;
}
int main()
{ 
	char c[10][10];
	int sum1=0,sum2=0,sum3=0;
	int i=0,j=0,k=0,p=0,a=0,m=0;
	for(i=1;i<=5;i++)
	{
		c[i][2]=' ';
	}
	for(i=1;i<=5;i++)
		for(j=1;j<=5;j++)
		{
			if(i==j)
				continue;
			for(k=1;k<=5;k++)
			{
				if(i==k||j==k)
					continue;
				for(p=1;p<=5;p++)
				{
					if(i==p||j==p||k==p)
						continue;
					sum1=(i+j==k+p);
					sum2=(i+p>j+k);
					sum3=(i+k<j);
					if(sum1+sum2+sum3==3)
					{
						c[i][2]='z';
						c[j][2]='q';
						c[k][2]='s';
						c[p][2]='l';

					}
				}
			}
		}
		for(m=5;m>=1;m--)
		{

			if(c[m][2]!=' ')
			{
				a=10*m;
				cout<<c[m][2]<<" "<<a<<endl;
			}
		}
		return 0;
}
/*
 * ???.cpp
 *
 *  Created on: 2013-10-13
 *      Author: 111
 */
int main()
{
	int z,q,s,l,i,sum=0;
	for (z=10;z<=50;z=z+10)             //????for??
	{
		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)+(z!=s)+(z!=l)+(q!=s)+(q!=l)+(s!=l)+(z+q==s+l)+(z+l>s+q)+(z+s<q);
							if (sum==9)     //??9??????
							{
								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 z,q,s,l,i;
	for(z=50;z>=10;z=z-10)
	{
		for(q=50;q>=10;q=q-10)
		{
			for(s=50;s>=10;s=s-10)
			{
				for(l=50;l>=10;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)==4)
		{
		  
				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 z,q,s,l,a,b,c,d;
	for(z=10;z<=50;z+=10)
		for(q=10;q<=50;q+=10)
		{
			if(q==z) continue;
			for(s=10;s<=50;s+=10)
			{
				if(s==q||s==z) continue;
				for(l=10;l<=50;l+=10)
				{
					if(l==s||l==q||l==z) continue;
					if(z+q==s+l&&z+l>s+q&&z+s<q)
					{
						a=(z>q)+(z>s)+(z>l);
						b=(q>z)+(q>s)+(q>l);
						c=(s>z)+(s>q)+(s>l);
						d=(l>z)+(l>q)+(l>s);
						if(a==3) cout<<"z"<<" "<<z<<endl;
						if(b==3) cout<<"q"<<" "<<q<<endl;
						if(c==3) cout<<"s"<<" "<<s<<endl;
						if(d==3) cout<<"l"<<" "<<l<<endl;
						if(a==2) cout<<"z"<<" "<<z<<endl;
						if(b==2) cout<<"q"<<" "<<q<<endl;
						if(c==2) cout<<"s"<<" "<<s<<endl;
						if(d==2) cout<<"l"<<" "<<l<<endl;
						if(a==1) cout<<"z"<<" "<<z<<endl;
						if(b==1) cout<<"q"<<" "<<q<<endl;
						if(c==1) cout<<"s"<<" "<<s<<endl;
						if(d==1) cout<<"l"<<" "<<l<<endl;
						if(a==0) cout<<"z"<<" "<<z<<endl;
						if(b==0) cout<<"q"<<" "<<q<<endl;
						if(c==0) cout<<"s"<<" "<<s<<endl;
						if(d==0) cout<<"l"<<" "<<l<<endl;
					}
				}
			}
		}
		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)
					{
						if(q>l && l>z && z>s)
						{
							cout<<"q"<<" "<<q<<endl;
							cout<<"l"<<" "<<l<<endl;
							cout<<"z"<<" "<<z<<endl;
							cout<<"s"<<" "<<s<<endl;

						}
						else if(l>q && q>z && z>s)
						{
							cout<<"l"<<" "<<l<<endl;
							cout<<"q"<<" "<<q<<endl;
							cout<<"z"<<" "<<z<<endl;
							cout<<"s"<<" "<<s<<endl;
						}
					}
				}
			}
		}
	}
	return 0;


}
int main()
{
	int weight[4]={1,1,1,1};//????/10
	char name[4]={'z','q','s','l'};
	/*????*/
	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[0]==weight[2]||weight[0]==weight[3]||weight[1]==weight[2]||weight[1]==weight[3]||weight[2]==weight[3])
						continue;
					else 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;
	}
	/*??*/
	int max=0,t;//?????????
	for(int i=0;i<4;i++)
	{
		for(int j=0;j<4;j++)//???????
		{
			if(max<weight[j])
			{
				max=weight[j];
				t=j;
			}
		}
		cout<<name[t]<<' '<<weight[t]*10<<endl;
		weight[t]=0;//??????
		max=0;//???max
	}
	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-s)*(z-q)*(z-l)*(q-s)*(q-l)*(s-l)!=0))
                                                                        {
                                                                                                                                                    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;
	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)
					{
						printf("l %d\nq %d\nz %d\ns %d",l,q,z,s);
					}
				}
			}
		}

	}
	return 0;
}
int main(){
  int z,q,s,l,t,num[4];
  char ch,name[4];
  for (int z = 1; z<= 5; ++z)
    for (int q = 1; q<=5; ++q)
      for (int s = 1; s<=5; ++s)
        for (int l = 1; l<=5; ++l)
          if ((z+q == s+l)&&(z+l > s+q)&&(z+s < q)){
                              num[0]=z; num[1]=q; num[2]=s; num[3]=l;
                              name[0]='z'; name[1]='q'; name[2]='s'; name[3]='l';
                              for (int i=0; i<4 ; ++i)
                                for (int j=i; j<4; ++j)
                                  if (num[j]>num[i]){ t =num[i]; num[i]=num[j]; num[j]=t;
                                                      ch=name[i]; name[i]=name[j]; name[j]=ch;
                                                     } 
                              for (int i=0; i<4; ++i)
                                cout << name[i] << " " << num[i]*10 << endl;
                              return 0;
                              }
}
int main()
{
    char a[5]={"lqzs"};
    int b[4]={50,40,20,10};

    for(int i=0;i<4;i++)
        cout<<a[i]<<" "<<b[i]<<endl;
	return 0;
}
int main()
{
	int z,q,s,l;//?????
	int a,b,c;//????
	int w[6]={0};//????????
	char r[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++)//??
				{
					a=(z+q==s+l);
					b=(z+q>q+s);
					c=(z+s<q);
					if((a+b+c)==3)//????
					{
						w[z]=z*10;r[z]='z';
						w[q]=q*10;r[q]='q';
						w[s]=s*10;r[s]='s';
						w[l]=l*10;r[l]='l';
					}//??
					
				}
			}
		}
	}
	{
		for(int i=5;i>=1;i--)
			if(w[i]!=0)
				cout<<r[i]<<" "<<w[i]<<endl;//??
	}
	return 0;
}
void sort(struct per a[],int n);
struct per
{
       char c;
       int w;
};
main()
{
      int flag=0,i;
      struct per p[4];
      p[0].c='z';
      p[1].c='q';
      p[2].c='s';
      p[3].c='l';
      for(p[0].w=10;p[0].w<=50;p[0].w+=10)
      {
           for(p[1].w=10;p[1].w<=50;p[1].w+=10)
           {
                 for(p[2].w=10;p[2].w<=50;p[2].w+=10)
                 {
                       for(p[3].w=10;p[3].w<=50;p[3].w+=10) 
                       {
                             if((p[0].w+p[1].w==p[2].w+p[3].w)&&(p[0].w+p[3].w>p[2].w+p[1].w)&&(p[0].w+p[2].w<p[1].w))
                             {
                                   flag=1;
                                   break;                             
                             }               
                       }
                       if(flag==1)
                             break;              
                 }
                 if(flag==1)
                       break;            
           }
           if(flag==1)
                 break;             
      }
      sort(p,4);
      for(i=0;i<4;i++)
      {
           printf("%c %d\n",p[i].c,p[i].w);           
      }
     
}

void sort(struct per a[],int n)
{
     int i,m,j;
     struct per temp;
     for(i=0;i<n;i++)
     {
          m=i;
          for(j=i+1;j<n;j++)
          {
                if(a[j].w>a[m].w)
                      m=j;            
          }   
          if(m!=i)
          {
                temp=a[i];
                a[i]=a[m];
                a[m]=temp;  
          }        
     }
}