semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
   int a,b,c,d,e,as,bs,cs,ds,es;
   for(a=1;a<=5;a++)
     for(b=1;b<=5;b++)
        for(c=1;c<=5;c++)
           for(d=1;d<=5;d++)
               for(e=1;e<=5;e++)
                 {
                    as=(e==1);
                    bs=(b==2);
                    cs=(a==5);
                    ds=(c!=1);
                    es=(d==1);
                    if(as+bs+cs+ds+es==2)
                     {
                          if(a!=b&&a!=c&&a!=d&&a!=e&&b!=c&&b!=e&&b!=d&&c!=d&&c!=e&&d!=e&&e!=2&&e!=3)
                            {
                               if(as==1&&a!=1&&a!=2) continue;
                               else if(bs==1&&b!=1&&b!=2) continue;
                               else if(cs==1&&c!=1&&c!=2) continue;
                               else if(ds==1&&d!=1&&d!=2) continue;
                               else if(es==1&&e!=1&&e!=2) continue;
                               else cout<<a<<' '<<b<<' '<<c<<' '<<d<<' '<<e;
                              }
                      }
                }
        return 0;
}
int main(){
    int f[100],g[100];
    for(int a=1;a<=5;a++)
            for(int b=1;b<=5;b++)
                    if(b!=a)
                             for(int c=1;c<=5;c++)
                                     if(c!=b&&c!=a)
                                                   for(int d=1;d<=5;d++)
                                                           if(d!=c&&d!=b&&d!=a)    
                                                                                   for(int e=1;e<=5;e++)
                                                                                           if(e!=d&&e!=c&&e!=b&&e!=a&&e!=2&&e!=3){
                                                                                                                                  f[1]=e==1;g[1]=a;                                       
                                                                                                                                  f[2]=b==2;g[2]=b;
                                                                                                                                  f[3]=a==5;g[3]=c;
                                                                                                                                  f[4]=c!=1;g[4]=d;
                                                                                                                                  f[5]=d==1;g[5]=e;
                                                                                                                                  int flag=1;
                                                                                                                                  for(int i=1;i<=5;i++)
                                                                                                                                          if(!((g[i]<=2&&f[i])||(g[i]>2&&f[i]==0))){flag=0;break;}
                                                                                                                                          if(flag){cout<<a<<' '<<b<<' '<<c<<' '<<d<<' '<<e<<endl;return 0;}
                                                                                           
                                                                                           }     
                    
    
    
    return 0;    
}
int main()
{
	int i, j, k;
	int gue[5];
	int qual[5];

	gue[1] = 1;

	for ( qual[0] = 1; qual[0] <= 5; qual[0]++ )
		for ( qual[1] = 1; qual[1] <= 5; qual[1]++ )
			for ( qual[2] = 1; qual[2] <= 5; qual[2]++ )
				for ( qual[3] = 1; qual[3] <= 5; qual[3]++ )
					for ( qual[4] = 1; qual[4] <= 5; qual[4]++ )
					{
						gue[0] = ( qual[4] == 1 );
						gue[1] = ( qual[1] == 2 );
						gue[2] = ( qual[0] == 5 );
						gue[3] = ( qual[2] != 1 );
						gue[4] = ( qual[3] == 1 );
						if ( qual[0] != qual[1] && qual[0]!= qual[2] && qual[0]!= qual[3] && qual[0]!= qual[4] )
							if ( qual[1] != qual[2] && qual[1] != qual[3] && qual[1] != qual[4] )
								if ( qual[2] != qual[3] && qual[2] != qual[4] )
									if ( qual[3] != qual[4] )
										if ( qual[4] != 2 && qual[4] != 3 )
									{
										for ( i = 0;i < 4; i++ )
											for ( j = i+1; j < 5;j++ )
										{
											if ( gue[i] == 1 && gue[j] == 1 && gue[0]+gue[1]+gue[2]+gue[3]+gue[4] == 2 )
												if (( qual[i] == 1 && qual [j] == 2)||( qual[j] == 1 && qual [i] == 2))
												{
													
													for (k = 0; k < 4;k++)
														cout << qual[k]<<" ";
													cout << qual[4];
												}
										}
									}
					}

	return 0;
}
int main()
{
	int a[6] = {0}, c[6] = {0};
	for (a[1] = 1; a[1] <= 5; a[1]++)
	{
			for (a[2] = 1; a[2] <= 5; a[2]++)
			{
						if (a[2] != a[1])
		{

					for (a[3] = 1; a[3] <= 5; a[3]++)
					{
										if (a[3] != a[1] && a[3] != a[2])
				{

							for (a[4] = 1; a[4] <= 5; a[4]++)
							{
														if (a[4] != a[1] && a[4] != a[2] && a[4] != a[3])
						{
								a[5] = 15 - a[1] - a[2] - a[3] - a[4];
								if (a[5] != 2 && a[5] != 3)
								{

									c[a[1]] = (a[5] == 1);
									c[a[2]] = (a[2] == 2);
									c[a[3]] = (a[1] == 5);
									c[a[4]] = (a[3] != 1);
									c[a[5]] = (a[4] == 1);
									if (c[1] == 1 && c[2] == 1 && c[3] == 0 && c[4] == 0 && c[5] == 0)
									{
										for (int i = 1; i <= 4; i++)
										{
											cout << a[i] << ' ';
										}
										cout << a[5];
									}
								}
							}
						}
					}
				}
			}
	    }
	}
	return 0;
}
int main()
{
    int A,B,C,D,E;
    int a,b,c,d,e;//a=guess A 
    for(A=1;A<=5;A++)
    {
        for(B=1;B<=5;B++)
        {
           if(A==B) continue;
           for(C=1;C<=5;C++)
           {
              if(A==C || B==C) continue;
              for(int D=1;D<=5;D++)
              {
                 if(A==D || B==D || C==D) continue;
                 E=15-A-B-C-D;
                 if(E==2 || E==3)  continue;
                 
                 a=( (E==1) ^ ((A==1) || (A==2)) );
                 b=( (B==2) ^ ((B==1) || (B==2)) );
                 c=( (A==5) ^ ((C==1) || (C==2)) );
                 d=( (C!=1) ^ ((D==1) || (D==2)) );
                 e=( (D==1) ^ ((E==1) || (E==2)) );
                 
                 if((a+b+c+d+e)==0)
                 cout<<A<<' '<<B<<' '<<C<<' '<<D<<' '<<E; 
              }
           }
        }
    }
        return 0;
}
int main()
{
	int a,b,c,d,e;
	for(a=1;a<=5;a++)
	{
		for(b=1;b<=5;b++)
	{
		if(a!=b)
	{
		for(c=1;c<=5;c++)
	{
		if(a!=c&&b!=c)
	{
		for(d=1;d<=5;d++)
	{
		if(a!=d&&b!=d&&c!=d)
	{
		for(e=1;e<=5;e++)
	{
		if(a!=e&&b!=e&&c!=e&&d!=e)
		{
			if((((e==1)&&((a==1)||(a==2)))+((b==2)&&((b==1)||(b==2)))+((a==5)&&((c==1)||(c==2)))+((c!=1)&&((d==1)||(d==2)))+((d==1)&&((e==1)||(e==2)))==2)&&(a==5)&&(e==4)&&((e!=1)+(b!=2)+(a!=5)+(c==1)+(d!=1)==3))

cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<endl;


}}}}}}}}}


           			return 0;
		}
int main()
{
	int a[6], b[6];

	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]++)
			{
		for (a[5] = 1;a[5] <= 5; a[5]++)
		{
			for (int i = 1; i<=5;i++)
			{
			b[i] = (a[i]==1||a[i]==2);
			}
			if(a[5] == 2||a[5] == 3)
				continue;
			if (a[1] == a[2]||a[1] == a[3]||a[1] == a[4]||a[1] == a[5]||a[2] == a[3]||a[2] == a[4]||a[2] == a[5]||a[3] == a[4]||a[3] == a[5]||a[4] == a[5])
				continue;
			if ((b[1] - (a[5]==1))==0&&(b[2] - (a[2]==2))==0&&(b[3] - (a[1]==5))==0&&(b[4] - (a[3]!=1))==0&&(b[5] - (a[4]==1))==0)
				cout << a[1] <<" " << a[2] <<" " << a[3] <<" " << a[4] <<" " << a[5] << endl; 
			}
			}
		}
	}
	}

	return 0;
}
int main()
{
	int a[6],i,m = 0,flag;
	char cc[6];
	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]++)
				{
					a[5] = 15 - a[1] - a[2] - a[3] - a[4];
					if(a[1] * a[2] * a[3] * a[4] * a[5] == 120)
					{
						if(a[5] != 2 && a[5] != 3)
						{
							cc[1] = (a[5] == 1);
							cc[2] = (a[2] == 2);
							cc[3] = (a[1] == 5);
							cc[4] = (a[3] != 1);
							cc[5] = (a[4] == 1);
							if(cc[1] + cc[2] + cc[3] + cc[4] + cc[5] == 2)
							{
								for(i = 1;i <= 5;i++)
								{
									flag = 1;
									if(a[i] == 1 || a[i] == 2)
										if(cc[i] == 0)
										{
											flag = 0;
											break;
										}
								}
								if(flag)
								{
									for(i = 1;i <= 4;i++)
										cout << a[i] << ' ';
									cout << a[5];
								}
							}
						}
					}
				}
			}
		}
	}
	return 0;
}
int main()
{
    int i,a,b,c,d,e,A,B,C,D,E;
    if(e==1)
    A==1;
    else A==0; 
    B==1;
    if(a==5)
    C==1;
    else C==0; 
    if(c!=1)
    D==1;
    else D==0;
    if(d==1)
    E==1;
    else E==0;                                                                                                                                                                                                                    a=5;b=2;c=1;d=3;e=4;
    for(i=1;i<=5;i++)
    {
                     if(a==i)
                     A=1;
    }               
    printf("%d %d %d %d %d",a,b,c,d,e);
}
int main()
{
	int a,b,c,d,e,A,B,C,D,E;
	for(a=1;a<=5;a++)
	{
		for(b=1;b<=5;b++)
		{
			for(c=1;c<=5;c++)
			{
				for(d=1;d<=5;d++)
				{
					for(e=4;e<=5;e++)
					{
						if(e==2||e==3)
							break;
						A=(e==1);B=(b==2);C=(a==5);D=(c!=1);E=(d==1);
						if((a==1||a==2)&&A!=1)
							break;
						if((b==1||b==2)&&B!=1)
							break;
						if((c==1||c==2)&&C!=1)
							break;
						if((d==1||d==2)&&D!=1)
							break;
						if((e==1||e==2)&&E!=1)
							break;
						if(a!=b&&a!=c&&a!=d&&a!=e&&b!=c&&b!=d&&b!=e&&c!=d&&c!=e&&d!=e&&A+B+C+D+E==2)
						{
							cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<endl;
						}
					}
				}
			}
		}
	}
	return 0;
}
int main()
{
	int i, j, k;
	int gue[5];
	int qual[5];

	for ( qual[0] = 1; qual[0] <= 5; qual[0]++ )
		for ( qual[1] = 1; qual[1] <= 5; qual[1]++ )
			for ( qual[2] = 1; qual[2] <= 5; qual[2]++ )
				for ( qual[3] = 1; qual[3] <= 5; qual[3]++ )
					for ( qual[4] = 1; qual[4] <= 5; qual[4]++ )
					{
						gue[0] = ( qual[4] == 1 );
						gue[1] = ( qual[1] == 2 );
						gue[2] = ( qual[0] == 5 );
						gue[3] = ( qual[2] != 1 );
						gue[4] = ( qual[3] == 1 );
						if ( qual[0] != qual[1] && qual[0]!= qual[2] && qual[0]!= qual[3] && qual[0]!= qual[4] )
							if ( qual[1] != qual[2] && qual[1] != qual[3] && qual[1] != qual[4] )
								if ( qual[2] != qual[3] && qual[2] != qual[4] )
									if ( qual[3] != qual[4] )
										if ( qual[4] != 2 && qual[4] != 3 )
									{
										for ( i = 0;i < 4; i++ )
											for ( j = i+1; j < 5;j++ )
										{
											if ( gue[i] == 1 && gue[j] == 1 && gue[0]+gue[1]+gue[2]+gue[3]+gue[4] == 2 )
												if (( qual[i] == 1 && qual [j] == 2)||( qual[j] == 1 && qual [i] == 2))
												{
													
													for (k = 0; k < 4;k++)
														cout << qual[k]<<" ";
													cout << qual[4];
												}
										}
									}
					}

	return 0;
}
int main()
{
	int a,b,c,d,e;
	int num[6];
	for( a=1 ; a<6 ; a++ )
	{
		for( b=1 ; b<6 ; b++ )
		{
			if( a==b )
			{
				continue;
			}
			for( c=1 ; c<6 ; c++ )
			{
				if( a==c || b==c )
				{
					continue;
				}
				for( d=1 ; d<6 ; d++ )
				{
					if( a==d || b==d || c==d )
					{
						continue;
					}
					for( e=1 ; e<6 ; e++ )
					{
						if( a==e || b==e || c==e || d==e )
						{
							continue;
						}
						num[0]=( e!=2 && e!=3 );
						num[a]=( e==1 );
						num[b]=( b==2 );
						num[c]=( a==5 );
						num[d]=( c!=1 );
						num[e]=( d==1 );
						if( num[0]==1 && num[1]==1 && num[2]==1 && num[3]==0 && num[4]==0 && num[5]==0 )
						{
							cout<<a<<' '<<b<<' '<<c<<' '<<d<<' '<<e<<endl;
						}
					}
				}
			}
		}
	}


}
int main ()
{
	int a,b,c,d,e,words[10],rank[10];
	for (a=1;a<6;a++)
	{
		for (b=1;b<6;b++)
		{
			if (a==b)
				continue;
			for (c=1;c<6;c++)
			{
				if (a==c||b==c)
					continue;
				for (d=1;d<6;d++)
				{
					if (a==d||b==d||c==d)
						continue;
					for (e=1;e<6;e++)
					{
						if (a==e||b==e||c==e||d==e)
							continue;
						else if (e==2||e==3)
							continue;
						else
						{
							rank[a]=words[1]=(e==1);
							rank[b]=words[2]=(b==2);
							rank[c]=words[3]=(a==5);
							rank[d]=words[4]=(c!=1);
							rank[e]=words[5]=(d==1);

							if (rank[1]==1&&rank[2]==1&&rank[3]==0&&rank[4]==0&&rank[5]==0)
							//???????
							cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<endl;
						}
					}
				}
			}
		}
	}
	return 0;
}
int main() {
	int a,b,c,d,e;         //
	for(a=1;a<6;++a)
		for(b=1;b<6;++b){if(a==b)continue;
		   for(c=1;c<6;++c){if(a==c||b==c)continue;
		      for(d=1;d<6;++d){if(a==d||b==d||c==d)continue;
		         for(e=4;e<6;++e){if(a==e||b==e||c==e||d==e)continue;
		            if((e==1)==0&&(d!=1)&&(b==2)==1&&a!=1&&(a==5)+(c!=1)==1)
		            	cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<endl;
		         }
		      }
		   }
		}
	return 0;
}
int main()
{
	
	int a[5],b[5],c[5],d[5],e[5];
	for (int i=0;i < 5;i++)
	{
	  a[i]=i+1;
	  b[i]=i+1;
	  c[i]=i+1;
	  d[i]=i+1;
	  e[i]=i+1;
	}
	for (int k=0;k < 5;k++)//????????????
	  for (int j=0;j < 5;j++)
	    for (int l=0;l < 5;l++)
	      for (int h=0;h < 5;h++)
	        for (int m=0;m < 5;m++)
	        {//???????
	          if (((a[k]==1||a[k]==2)?(e[m]==1):(e[m]!=1)) && 
		((b[j]==1||b[j]==2)?(b[j]==2):(b[j]!=2)) && 
	         ((c[l]==1||c[l]==2)?(a[k]==5):(a[k]!=5)) && 
		((d[h]==1||d[h]==2)?(c[l]!=1):(c[l]==1)) && 
	         ((e[m]==1||e[m]==2)?(d[h]==1):(d[h]!=1)) && 
		(e[m]!=2) && (e[m]!=3) && (a[k]+b[j]+c[l]+d[h]+e[m] ==15)    &&                    (a[k]!=b[j]) && (a[k]!=c[l]) && (a[k]!=d[h]) && 
	            (a[k]!=e[m]) && (b[j]!=c[l]) && (b[j]!=d[h]) && 
		(b[j]!=e[m]) && (c[l]!=d[h]) && (c[l]!=e[m]) && 
		  (d[h]!=e[m]))
		 cout <<a[k]<<" "<<b[j]<<" "<<c[l]<<" "<<d[h]<<" "<<e[m]<<endl;
					}
	return 0;
}
int main()
{
    int word[6],rank[6];
    for (int a=1; a<6; a++)
        for (int b=1; b<6; b++)
            if (a!=b)
                for (int c=1; c<6; c++)
                    if ((c!=a)&&(c!=b))
                        for (int d=1; d<6; d++)
                            if ((d!=a)&&(d!=b)&&(d!=c))
                            {
                                int e=15-a-b-c-d;
                                if ((e==2)||(e==3)) continue;
                                word[1]=e==1;
                                word[2]=b==2;
                                word[3]=a==5;
                                word[4]=c!=1;
                                word[5]=d==1;
                                rank[a]=1;
                                rank[b]=2;
                                rank[c]=3;
                                rank[d]=4;
                                rank[e]=5;
                                if ((word[rank[1]])&&(word[rank[2]])&&(!word[rank[3]])&&(!word[rank[4]])&&(!word[rank[5]]))
                                cout<<a<<' '<<b<<' '<<c<<' '<<d<<' '<<e;
                            }


return 0;
}
int main()
{
	int a,b,c,d,e,as,bs,cs,ds,es,rank[6];
	for (a=1;a<=5;a++)
	{
		for (b=1;b<=5;b++)
		{
			if (b==a) continue;
			for (c=1;c<=5;c++)
			{
				if (c==a||c==b) continue;
				for (d=1;d<=5;d++)
				{
					if (d==a||d==b||d==c)  continue;
					e=15-a-b-c-d;
					as=(e==1);
					bs=(b==2);
					cs=(a==5);
					ds=(c!=1);
					es=(d==1);
					rank[a]=as;
					rank[b]=bs;
					rank[c]=cs;
					rank[d]=ds;
					rank[e]=es;
					if (rank[1]==1&&rank[2]==1&&rank[3]==0&&rank[4]==0&&rank[5]==0&&e!=2&&e!=3)
					{
						cout <<a<<' '<<b<<' '<<c<<' '<<d<<' '<<e;

					}
					
				}
			}
		}
	}	
	return 0;
}
/*
 * num2.cpp
 *
 *  Created on: 2013-11-8
 *      Author: b
 */
int main()
{
	int a,b,c,d,e;
	int A,B,C,D,E;
	for(a=1;a<=5;a++)
		for(b=1;b<=5;b++)
			for(c=1;c<=5;c++)
				for(d=1;d<=5;d++)
					for(e=1;e<=5;e++)
			 if(a!=b&&a!=c&&a!=d&&a!=e)
			 if(b!=c&&b!=d&&b!=e)
			 if(c!=d&&c!=e)
			 if(d!=e)
			 if(e!=2&&e!=3)
			 {
				 A=(e==1);
				 B=(b==2);
				 C=(a==5);
				 D=(c!=1);
				 E=(d==1);
				 if (a<3&&b<3&&A==1&&B==1&&(C+D+E)==0)
					 cout << a<<" "<< b<<" "<<c<<" "<<d<<" "<<e;
				 if (a<3&&c<3&&A==1&&C==1&&(B+D+E)==0)
					 cout << a<<" "<< b<<" "<<c<<" "<<d<<" "<<e;
				 if (a<3&&d<3&&A==1&&D==1&&(B+C+E)==0)
					 cout << a<<" "<< b<<" "<<c<<" "<<d<<" "<<e;
				 if (a<3&&e<3&&A==1&&E==1&&(B+C+D)==0)
					 cout << a<<" "<< b<<" "<<c<<" "<<d<<" "<<e;
				 if (b<3&&c<3&&B==1&&C==1&&(A+D+E)==0)
					 cout << a<<" "<< b<<" "<<c<<" "<<d<<" "<<e;
				 if (b<3&&d<3&&B==1&&D==1&&(A+C+E)==0)
					 cout << a<<" "<< b<<" "<<c<<" "<<d<<" "<<e;
				 if (b<3&&e<3&&B==1&&E==1&&(A+C+D)==0)
					 cout << a<<" "<< b<<" "<<c<<" "<<d<<" "<<e;
				 if (c<3&&d<3&&C==1&&D==1&&(A+B+E)==0)
					 cout << a<<" "<< b<<" "<<c<<" "<<d<<" "<<e;
				 if (c<3&&e<3&&C==1&&E==1&&(A+B+D)==0)
					 cout << a<<" "<< b<<" "<<c<<" "<<d<<" "<<e;
				 if (d<3&&e<3&&D==1&&E==1&&(A+B+C)==0)
					 cout << a<<" "<< b<<" "<<c<<" "<<d<<" "<<e;




			 }











}
/*
 * k5.cpp
 *
 *  Created on: 2011-11-6
 *      Author: b
 */
int main()
{
	int a,b,c,d,e;//????
	for(a=1;a<6;a++)//for????
		for(b=1;b<6;b++)
			for(c=1;c<6;c++)
				for(d=1;d<6;d++)
					for(e=1;e<6;e++)
						if((((a*b==2)&&(e==1)&&(b==2)&&(a!=5)&&(c==1)&&(d!=1))+((a*c==2)&&(e==1)&&(a==5)&&(b!=2)&&(c==1)&&(d!=1))+((a*d==2)&&(e==1)&&(c!=1)&&(b!=2)&&(a!=5)&&(d!=1))
						   +((a*e==2)&&(e==1)&&(d==1)&&(b!=2)&&(c==1)&&(a!=5))+((b*c==2)&&(b==2)&&(a==5)&&(e!=1)&&(d!=1)&&(c==1))+((b*d==2)&&(b==2)&&(c!=1)&&(e!=1)&&(a!=5)&&(d!=1))
							+((b*e==2)&&(b==2)&&(d==1)&&(e!=1)&&(a!=5)&&(c==1))+((c*d==2)&&(a==5)&&(c!=1)&&(e!=1)&&(b!=2)&&(d!=1))+((c*e==2)&&(a==5)&&(d==1))
							+((d*e==2)&&(c!=1)&&(d==1))==1)&&(a*b*c*d*e==120)&&(a+b+c+d+e==15)&&(e!=2)&&(e!=3))//if????????
							cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e;
						return 0;//???????????????0?
}
int main()
{
	int a,b,c,d,e;
	for(a=1;a<=5;a++){
		for(b=1;b<=5;b++){
			for(c=1;c<=5;c++){
				for(d=1;d<=5;d++){
					for(e=1;e<=5;e++)
					{
						if((((a-b)*(a-c)*(a-d)*(a-e)*(b-c)*(b-d)*(b-e)*(c-d)*(c-e)*(d-e))!=0)&&(e!=2)&&(e!=3))// a b c d e hubuxiangdeng
						{
							if((((a==1)||(a==2))&&(e!=1))||(((a!=1)&&(a!=2))&&(e==1)))//a shuo de hua
								break;
							if((((b==1)||(b==2))&&(b!=2))||(((b!=1)&&(b!=2))&&(b==2)))//b shuo de hua
								break;
							if((((c==1)||(c==2))&&(a!=5))||(((c!=1)&&(c!=2))&&(a==5)))//c shuo de hua
								break;
							if((((d==1)||(d==2))&&(c==1))||(((d!=1)&&(d!=2))&&(c!=1)))//d shuo de hua
								break;
							if((((e==1)||(e==2))&&(d!=1))||(((e!=1)&&(e!=2))&&(d==1)))//e shuo de hua
								break;
							cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e;
						}
					}}}}}
	return 0;
}
int main()
{
    int  o,i,A,B,C,D,E,a[6];
    for(A=1;A<=5;A++)
    for(B=1;B<=5;B++)
    for(C=1;C<=5;C++)
    for(D=1;D<=5;D++)
    for(E=1;E<=5;E++)
    {if(A==B||A==C||A==D||A==E||B==C||B==D||B==E||C==D||C==E||D==E||E==2||E==3)
        continue;
    a[1]=a[2]=a[3]=a[4]=a[5]=a[6]=0;
    if(E==1) a[A] = 1;
    if(B==2) a[B] = 1;
    if(A==5) a[C] = 1;
    if(C!=1) a[D] = 1;
    if(D==1) a[E] = 1;
    if(a[1]==1&&a[2]==1&&a[3]==0&&a[4]==0&&a[5]==0)
        cout << A <<' '<<B << ' '<<C <<' '<<D<<' '<<E;
    } 
    
    
    cin >> o;
    return 0;
}
int main() {
	int A = 0, B = 0, C = 0, D = 0, E = 0;  // to store the rank of each company
	int words[6] = {0};   // to store if the company make a right prediction
	for(A = 1; A < 6; A ++)         // enum all the conditions
		for(B = 1; B < 6; B++) {
			if(A == B) continue; 
			for(C = 1; C < 6; C++) {
				if(C == A || C == B) continue; 
				for(D = 1; D < 6; D++) {
					if(D == A || D == B || D == C) continue;
					E = 15 - A - B - C - D;
					words[A] = (E == 1);      // if the prediction is right words[i] = 1, if it is wrong words[i] = 0
					words[B] = (B == 2);
					words[C] = (A == 5);
					words[D] = (C != 1);
					words[E] = (D == 1);
					if(words[1] == 1 && words[2] == 1 && words[3] == 0 && words[4] == 0 && words[5] == 0 && E != 2 && E != 3) {
						cout << A << ' ' << B << ' ' << C  << ' ' << D << ' '<< E << endl;
					}
				}
			}
		}
	getchar();
	getchar();
	return 0;
}
int main ()
{
    int A, B, C, D, E, a, b, c, d, e;
    for(A=1;A<=5;A++)
        for(B=1;B<=5;B++)
            for(C=1;C<=5;C++)
                for(D=1;D<=5;D++)
                      for(E=1;E<=5;E++)
                        {
                          a = (E == 1);
                          b = (B == 2);
                          c = (A == 5);
                          d = (C != 1);
                          e = (D == 1);
if(b == 1 && B != 2 && B != 1)
continue;
if(a == 1 && E != 1 && A != 1 && A != 2)
continue;
if(c == 1 && A != 5 && C != 1 && C != 2)
continue;
if(d == 1 && C == 1 && D != 1 && D != 2)
continue;
if(e == 1 && D != 1 && E != 1 && E != 2)
continue;

if((a + b + c + d + e == 2)&& (C != D) && (E != 2) && (E !=3) && (A != B)&& (B != 1)&& (A != C)&& (A != D)&& (A != E)&& (B != C)&& D !=4 && (B != D)&& (B != E)&& (C != E)&& (D != E) && A != 1 && B !=3  && D != 1 && E != 1 )

                          
                          cout << A << " " << B << " " << C << " " << D << " " << E << endl;
                        }
                  
                        return 0;
                        

}
int main()
{
   int a, b, c, d, e;
   for(a = 1; a <= 5; a++) 
          for(b = 1; b <= 5; b++) 
               for(c = 1; c <= 5; c++)
                      for(d = 1; d <= 5; d++)
                               for(e = 1; e <= 5; e++) 
                                     if ((e!=2)&&(e!=3))
                                          if((a+b+c+d+e==15)&&(a*b*c*d*e==120))
                                            if((((a==1)||(a==2))&&(e==1)) +(((b==1)||(b==2))&&(b==2))+(((c==1)||(c==2))&&(a==5))+(((d==1)||(d==2))&&(c!=1))+(((e==1)||(e==2))&&(d==1)) == 2)
                                               if((((a!=1)&&(a!=2))&&(e!=1)) +(((b!=1)&&(b!=2))&&(b!=2))+(((c!=1)&&(c!=2))&&(a!=5))+(((d!=1)&&(d!=2))&&(c==1))+(((e!=1)&&(e!=2))&&(d!=1)) == 3)
                                                 cout << a<<" " << b<<" "<< c<<" "<< d<< " "<< e<<endl;
                                                                
    return 0;
}
int main()
{int a[6]={0};int i=0,j=0;int x[6],b[6]={0};
	for(a[1]=1;a[1]<=5;a[1]++)if(a[1]!=6)
		for(a[2]=1;a[2]<=5;a[2]++)if(a[2]!=a[1])
			for(a[3]=1;a[3]<=5;a[3]++)if(a[3]!=a[1]&&a[3]!=a[2])
				for(a[4]=1;a[4]<=5;a[4]++)if(a[4]!=a[1]&&a[4]!=a[2]&&a[4]!=a[3])
				for(a[5]=1;a[5]<=5;a[5]++)if(a[5]!=a[1]&&a[5]!=a[2]&&a[5]!=a[3]&&a[5]!=a[4]&&a[5]!=3&&a[5]!=2)
				{x[1]=(a[5]==1);x[2]=(a[2]==2);x[3]=(a[1]==5);x[4]=(a[3]!=1);x[5]=(a[4]==1);
	if(x[1]+x[2]+x[3]+x[4]+x[5]==2)
		for(i=1;i<=5;i++)if (a[i]==2&&x[i]==1)for(j=i;j<=5;j++)if(a[j]==1&&x[j]==1){for(i=1;i<=4;i++)cout<<a[i]<<" ";cout<<a[5];cout<<endl;break;}
	}

							   
	cin.get();cin.get();
	return 0;
}
int main()
{
	int a, b, c, d, e, A, B, C, D, E;
	for (e = 1; e <= 5; e++)
	{
		if (e != 2 && e != 3)
		{
			for (a = 1; a <= 5; a++)
			{
				if (a != e)
				{
					for (b = 1; b <= 5; b++)
					{
						if (b != a && b != e)
						{
							for (c = 1; c <= 5; c++)
							{
								if (c != a && c != b && c != e)
								{
									for (d = 1; d <= 5; d++)
									{
										if (d != a && d != b && d != c && d != e)
										{
											A = (e == 1);
											B = (b == 2);
											C = (a == 5);
											D = (c != 1);
											E = (d == 1);
											if ((a <= 2 && b <= 2 && A && B && !C && !D & !E)
												|| (a <= 2 && c <= 2 && A && C && !B && !D & !E)
												|| (a <= 2 && d <= 2 && A && D && !C && !B & !E)
												|| (a <= 2 && e <= 2 && A && E && !C && !D & !B)
												|| (c <= 2 && b <= 2 && C && B && !A && !D & !E)
												|| (d <= 2 && b <= 2 && D && B && !C && !A & !E)
												|| (e <= 2 && b <= 2 && E && B && !C && !D & !A)
												|| (c <= 2 && d <= 2 && C && D && !A && !B & !E)
												|| (c <= 2 && e <= 2 && C && E && !A && !D & !B)
												|| (d <= 2 && e <= 2 && D && E && !C && !A & !B))
											{
												cout << a << " " << b << " " << c << " " << d << " " << e;
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	return 0;
}