semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
main()
{
int a[5][5];
int maxi[5];
int minj[5];
int j1[5];
int i2[5]; 
int ii,io,ji,jo,i,j,i1,j2,i3,j3,k,l,m,n;
  l=0; 
 for(ii=0;ii<5;ii++)
    {for(ji=0;ji<5;ji++)
        {scanf("%d",&a[ii][ji]);
        }
    }      
for(i=0;i<5;i++)
{maxi[i]=a[i][0];
j1[i]=0;
for(j=0;j<5;j++)
{if(a[i][j]>maxi[i])
{maxi[i]=a[i][j];
j1[i]=j;}      ///j1?i??????/
}
}
for(jo=0;jo<5;jo++)
{minj[jo]=a[0][jo];
i2[jo]=0; 
for(io=0;io<5;io++)
{if(a[io][jo]<minj[jo])
{minj[jo]=a[io][jo];
i2[jo]=io;   //i2?j??????/ 
}
}

}
for (i3=0;i3<5;i3++)
{if(a[i3][j1[i3]]==minj[j1[i3]])
{printf("%d %d %d",i3+1,j1[i3]+1,minj[j1[i3]]);l++;}
}

if(l==0)
{printf("not found");}














}
// ????.cpp : ??????????????
//



int main()
{
	int i,j,k,a[5][5],max[5],min[5];
	for(i=0;i<=4;++i)
	{
		for(j=0;j<=4;++j)
		{
			scanf("%d",&a[i][j]);
		}
		scanf("\n");
	}
	for(i=0;i<=4;++i)
	{
		max[i]=0;
		for(j=0;j<=4;++j)
		{
			if(max[i]<a[i][j])
			{
				max[i]=a[i][j];
			}
		}
	}
	for(j=0;j<=4;++j)
	{
		min[j]=9999999;
		for(i=0;i<=4;++i)
		{
			if(min[j]>a[i][j])
			{
				min[j]=a[i][j];
			}
		}
	}
	k=0;
	for(i=0;i<=4;++i)
	{
		for(j=0;j<=4;++j)
		{
			if(max[i]==min[j])
			{
				printf("%d %d %d\n",i+1,j+1,max[i]);
				k++;
			}
		}
	}
	if(k==0) printf("not found\n");
	return 0;
}
int main()
{
	int array[6][6];
	int i,j;
    int flag1=1,tmp1,tmp2,flagx=0;
	for(i=1;i<=5;i++)
	{
		for(j=1;j<=5;j++)
		{
			scanf("%d",&array[i][j]);
		}
	}
    i=1;
	j=1;
	for(i=1;i<=5;i++)
	{
		for(j=1;j<=5;j++)
		{
			flag1=1;
		
			for(tmp1=1;tmp1<=5;tmp1++)
			{
				if(array[i][j]<array[i][tmp1])
					flag1=0;
			}
			for(tmp2=1;tmp2<=5;tmp2++)
			{
				if(array[i][j]>array[tmp2][j])
					flag1=0;
			}
			if(flag1==1)
			{
				printf("%d %d %d",i,j,array[i][j]);
			    flagx=1;
			}
		}
	}
	if(flagx==0)printf("not found");
	return 0;
}
int main()

{
	int A[5][5],B[5],C[5],k,i,j,n,m,x=0,a=1,b=1,c,d;

	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		{
			scanf("%d",&A[i][j]);
		}
	}
	

	for(i=0,m=0;i<5,m<5;i++,m++)
	{
		for(j=0;j<5;j++)
		{
			for(k=0;k<5;k++)
			{			
				if(A[i][j]>A[i][k])
				{
					a=a+1;
				}else
				{
					a=a;
				}

			}
			if(a==5)
			{
				B[m]=A[i][j];
			}
			a=1;
		}
	}

	for(j=0,n=0;j<5,n<5;j++,n++)
		{
		for(i=0;i<5;i++)
			{
			for(k=0;k<5;k++)
			{			
				if(A[i][j]<A[k][j])
				{
					b=b+1;
				}else
				{
					b=b;
				}
			}
			if(b==5)
			{
				C[n]=A[i][j];
			}
			b=1;
			
		}
	}

	for(m=0;m<5;m++)
	{
		for(n=0;n<5;n++)
		{
			if(B[m]==C[n])
			{
				x=1;
				c=m+1;
				d=n+1;
				printf("%d %d %d",c,d,B[m]);
			}	
		}
	}

		if(x==0)
		{
			printf("not found");
		}
	
	
	return 0;
}
int main()
{
	int a[5][5],i,j,max[5],min[5],k=0;//a[5][5]:?? (5*5)??;max[5]:?????;min[5]:?????;k:???????
	for(i=0;i<5;i++)
		for(j=0;j<5;j++)
			cin>>a[i][j];
	for(i=0;i<5;i++)
	{
		max[i]=a[i][0];
		for(j=0;j<5;j++)
			if(max[i]<a[i][j])
				max[i]=a[i][j];
	}
	for(j=0;j<5;j++)
	{
		min[j]=a[0][j];
		for(i=0;i<5;i++)
			if(min[j]>a[i][j])
				min[j]=a[i][j];
	}
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		{
			if(a[i][j]==max[i]&&a[i][j]==min[j])
			{
				cout<<++i<<" "<<++j<<" "<<a[i][j]<<endl;
                k++;
			}			
		}
	}
	if(k==0)
		cout<<"not found"<<endl;
	return 0;
}
int main()//?????
{
	int a[5][5],i=0,j=0;//??????
	int m[5],n[5];
	for(i=0;i<5;i++)//????
		for(j=0;j<5;j++)
			cin>>a[i][j];
	for(i=0;i<5;i++)//???????
	{
		m[i]=a[i][0];
		for(j=1;j<5;j++)
		{
			if(a[i][j]>m[i])
				m[i]=a[i][j];
		}
	}
	for(j=0;j<5;j++)//???????
	{
		n[j]=a[0][j];
		for(i=1;i<5;i++)
		{
			if(a[i][j]<n[j])
				n[j]=a[i][j];
		}
	}
	for(i=0;i<5;i++)//???? 
	{
		for(j=0;j<5;j++)
		{
			if(m[i]==n[j])
			{
				cout<<i+1<<' '<<j+1<<' '<<m[i];
				//break;
				
				return 0;
			}
			//else if(i==4 && j==4)
			//{
			//	cout<<"not found";
			//	break;
			//}
		}
		//if(m[i]==n[j])//???????????
		//	break;
	}
	cout<<"not found";
	
	return 0;//?????
}
/*
 * ????.cpp
 *
 *  Created on: 2010-11-19
 *      Author: IBM
 */


int main(){
	int a[5][5];
	int i,j,k,ok,x,y,s,p=0;
	for(i=0;i<5;i++)
			for(j=0;j<5;j++)
				cin>>a[i][j];
	for(i=0;i<5;i++)
		for(j=0;j<5;j++)
		{
			ok=1;
			for(k=0;k<5;k++)
				if((a[i][k]>a[i][j])||(a[i][j]>a[k][j]))
					ok=0;
			if(ok==1)
			{
				x=i;
				y=j;
				s=a[i][j];
				p=1;
			}
		}
	if(p==0)
		cout<<"not found"<<endl;
	else
		cout<<x+1<<' '<<y+1<<' '<<s<<endl;
	return 0;
}
/*
 * wanyi.cpp
 *
 *  Created on: 2012-10-31
 *      Author: 7
 */
int main()
{
	int a[6][6];
	int i,j,k;
	int max[6],row[6],line[6];
	int sig=0,l;
	memset(max,0,sizeof(max));
	for(i=1;i<6;i++)
	{
		for(j=1;j<6;j++)
		{
			cin>>a[i][j];
		}
	}
	for(i=1;i<6;i++)
	{
		for(j=1;j<6;j++)
		{
			if(max[i]<a[i][j])
			{
				max[i]=a[i][j];
				row[i]=i;
				line[i]=j;
			}
		}
	}
	for(i=1;i<6;i++)
	{
		for(k=1;k<6;k++)
				{
			l=line[i];
					if(max[i]>a[k][l])
					{
						break;
					}
					else if(k==5)
					{
						sig=1;
						cout<<row[i]<<" "<<line[i]<<" "<<max[i];
					}
				}
	}
	if(!sig)
	cout<<"not found";
}
//********************************
//*???????  **
//*?????? 1300012946 **
//*???2013.11.1  **
//********************************
int main()
{
	int a[5][5],i,j,p,q=0,count=0;
	for (i=0 ; i<5 ; i++)
		for (j=0 ; j<5 ; j++)
		{
			cin>>a[i][j];
		}
    for (i=0 ; i<5 ; i++)
	    for (j=0 ; j<5 ; j++)
		{
			for (p=0 ; p<5 ; p++)
			{
				if (a[i][j]>a[i][p])
					count++;
			}
			for (p=0 ; p<5 ; p++)
			{
				if (a[i][j]<a[p][j])
					count++;
			}
			if (count==8)
			{
				cout<<i+1<<" "<<j+1<<" "<<a[i][j];
				q++;
			}
			count=0;
		}
		if (q==0)
			cout<<"not found";
		return 0;
}
int main(){
	int n=5,i,j,e,lie=0,hang=0,k=0,m,sz[100][100];
    for(i=0;i<n;i++){
        for(j=0;j<n;j++){
        	scanf("%d",&sz[i][j]);
        }
    }
	for(i=0;i<n;i++){
		e=-1;
		for(j=0;j<n;j++){
			if(sz[i][j]>e){
				e=sz[i][j];
				lie=j+1;
				hang=i+1;
			}	
		}
		k=0;
		for(m=0;m<n;m++)
		{
			if(e>sz[m][lie-1]){
				k=1;
				break;
			}
		}
			if(k==0){
				printf("%d %d %d",hang,lie,e);
				scanf("%d",1);
				return 0;
			}
	}
	printf("not found");	 
    scanf("%d",1);
    return 0;
}
int max(int A,int B,int C,int D,int E){
if(A>B&&A>C&&A>D&&A>E) return A;
else if(B>A&&B>C&&B>D&&B>E) return B;
else if(C>A&&C>B&&C>D&&C>E) return C;
else if(D>A&&D>B&&D>C&&D>E) return D;
else return E;

}
int min(int L,int M,int N,int O,int P){
if(L<M&&L<N&&L<O&&L<P) return L;
else if(M<L&&M<N&&M<O&&M<P) return M;
else if(N<L&&N<M&&N<O&&N<P) return N;
else if(O<M&&O<N&&O<L&&O<P) return O;
else return P;
}
int main(){
	int a[5][5],i,j,k=0;
	for(i=0;i<5;i++)
		cin>>a[i][0]>>a[i][1]>>a[i][2]>>a[i][3]>>a[i][4];
	for(i=0;i<5;i++)
		for(j=0;j<5;j++){
			if(a[i][j]==max(a[i][0],a[i][1],a[i][2],a[i][3],a[i][4])
					&&a[i][j]==min(a[0][j],a[1][j],a[2][j],a[3][j],a[4][j])){
		cout<<i+1<<' '<<j+1<<' '<<a[i][j]<<endl;
		k++;
			}
		}
	if(k==0)
		cout<<"not found"<<endl;
	return 0;
}
int pfc(const void *p1, const void *p2)
{
    return *(int *)p2-*(int *)p1;
}

main()
{
    int a[5][5];
    int i,j,ri,rj,k=0;
    int ai[5]={0},aj[5]={0};
    for(i=0;i<5;i++)
        for(j=0;j<5;j++)
            scanf("%d",&a[i][j]);
    for(i=0;i<5;i++)
    {
        for(j=0;j<5;j++)
        {
            ai[j]=0;
            aj[j]=0;
        }
        for(j=0;j<5;j++)
            ai[j]=a[i][j];
        qsort(ai,5,sizeof(int),pfc);
        for(j=0;j<5;j++)
            if(a[i][j]==ai[0])
                {ri=i;rj=j;}
        for(j=0;j<5;j++)
            aj[j]=a[j][rj];
        qsort(aj,5,sizeof(int),pfc);
        if(a[ri][rj]==aj[4])
        {
            printf("%d %d %d",ri+1,rj+1,a[ri][rj]);
            k=1;
            return 0;
        }
    }
    if(k==0)
        printf("not found");
}
int main()
{
	int a[6][6]={0};
	int i=0,j=0,temp,max=0,min=0,got=0;
	for(i=0;i<5;i++)
		for(j=0;j<5;j++)
			cin>>a[i][j];
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		{
			if(a[i][j]>=a[i][0]&&a[i][j]>=a[i][1]&&a[i][j]>=a[i][2]&&a[i][j]>=a[i][3]&&a[i][j]>=a[i][4])
				temp=j;
		}
		if(a[i][temp]<=a[0][temp]&&a[i][temp]<=a[1][temp]&&a[i][temp]<=a[2][temp]&&a[i][temp]<=a[3][temp]&&a[i][temp]<=a[4][temp])
		{
			got=1;
			min=i;
			max=temp;
		}
	}
	if(got==1)
		cout<<min+1<<" "<<max+1<<" "<<a[min][max];
	else
		cout<<"not found";
	return 0;
}
int main()
{
	int a[6][6];
	int i,j,k=0;
	for (i=1;i<=5;i++)
	{
		for(j=1;j<=5;j++)
		{
			scanf("%d",&a[i][j]);
		}
	}
	int flag=0,m,p,c;
	for (i=1;i<=5;i++)
	{
		for(j=1;j<=5;j++)
		{
			flag=0;
			for(m=1;m<=5;m++)
			{
				if(a[i][j]>=a[i][m])
					flag=flag+1;
			}
			if(flag==5)
			{
				c=0;
				for(p=1;p<=5;p++)
				{
					if(a[i][j]<=a[p][j])
						c=c+1;
				}
				if(c==5)
				{
					printf("%d %d %d",i,j,a[i][j]);
					k=k+1;
				}
			}
		}
	}
	if(k==0)
		printf("not found");
	
	return 0;
}
int main()
{
	int a[5][5],i,j,k=0,p=0,h[5][3]={0},l[5][3]={0};
	for(i=0;i<5;i++){
		for(j=0;j<5;j++){
			scanf("%d",&a[i][j]);}}
    
	for(i=0;i<5;i++){
		for(j=0;j<5;j++){
			if(a[i][j]>k)k=a[i][j],h[i][0]=i,h[i][1]=j;}
	h[i][2]=k,	k=0;}


	//	for(i=0;i<5;i++){printf("%d %d %d\n",h[i][0],h[i][1],h[i][2]);}

k=100000;
	for(j=0;j<5;j++){
		for(i=0;i<5;i++){
			if(a[i][j]<k)k=a[i][j],l[j][0]=i,l[j][1]=j;}
		l[j][2]=k,k=100000;}

//	for(i=0;i<5;i++){printf("%d %d %d\n",l[i][0],l[i][1],l[i][2]);}

	for(i=0;i<5;i++){
		for(j=0;j<5;j++){
			if(h[i][2]==l[j][2]&&h[i][0]==l[j][0]&&h[i][1]==l[j][1]){
				printf("%d %d %d\n",h[i][0]+1,h[i][1]+1,h[i][2]),p++;}}
	}
	if(p==0)printf("not found");
        
}
int main(){
int sz[5][5],i,j,a,x=5,y=5,m=0,n=0;
for(i=0;i<5;i++){
    for(j=0;j<5;j++){
    scanf("%d",&(sz[i][j]));
    }


}
for(i=0;i<5;i++){
    for(j=0;j<5;j++){
        for(a=0;a<5;a++){
            if(a!=j){
            
                if(sz[i][j]>sz[i][a]){        
                   m=m+1;
                }
               

            }
            
            if(a!=i){
            
                if(sz[i][j]<sz[a][j]){
                n=n+1;
                
                }
                
            
            }

            
            
        }
    
        if((m==4)&&(n==4)){
            x=i+1;
            y=j+1;
        }
        else{m=0;n=0;}
    
    }


}

if(x==5){
printf("not found");
}
else{
printf("%d %d %d",x,y,sz[x-1][y-1]);
}
return 0;

}
int main()
{
	int s[ 6 ][ 6 ] = { 0 } , i , j , t[ 6 ][ 6 ] , a , b , c = 0 , m = 0 ;

	for( i = 1 ; i <= 5 ; i ++ )
		for( j = 1 ; j <= 5 ; j ++ )
			cin >> s[ i ][ j ] ;

	for( i = 1 ; i <= 5 ; i ++ )
	{
		a = i , b = 1 , t[ a ][ b ] = s[ i ][ 1 ] ;

		for( j = 1 ; j <= 5 ; j ++ )
			if( t[ a ][ b ] < s[ i ][ j ] )
				a = i , b = j , t[ a ][ b ] = s[ i ][ j ] ;

		for( j = 1 ; j <= 5 ; j ++ )
			if( t[ a ][ b ] <= s[ j ][ b ] )
				c ++ ;

		if( c == 5 )
		{
			cout << a << ' ' << b << ' ' << t[ a ][ b ] << endl ;
			m = 1 ;
		}

		c = 0 ;
	}

	if( m == 0 )
		cout << "not found" << endl ;
	
	return 0 ;
}
main()
{
      int i,j,k,max,maxj,f;
      int a[5][5];
      for(i=0;i<5;i++)
       for(j=0;j<5;j++)
        scanf("%d",&a[i][j]);
      for(i=0;i<5;i++)
      {
         max=a[i][0];
         k=0;
         maxj=1;
         for(j=0;j<5;j++)
         {
           if(a[i][j]>max)
           {
              max=a[i][j];
              k=j;
           }
         }
         for(f=0;f<5;f++)
         {
           if(max>a[f][k])
           {
             maxj=0;
             break;
           }
         }
         if(maxj==1)
         {
                    printf("%d %d %d\n",i+1,k+1,max); 
                    break;
         }
      }
      if(maxj==0)
        printf("not found");              
}
//***************************
//*???????          **
//*????? 1300012921   **
//*???2013.11.05        **
//*************************** 
int main()

{
	int a[6][6];
	
	for(int i = 1; i <= 5; i++)
	{
		for(int j = 1; j <= 5; j++)
			cin >> a[i][j];
	}
	
	int max, min, row, col, flag = 0;
	for(int i = 1; i <= 5; i++)
	{
		col = 1;
		max = a[i][1];
		for(int j = 2; j <= 5; j++)
		{
			if(a[i][j] > max)
			{ 
				max = a[i][j];
				col = j;
			} 
		}
		
		row = 1;
		min = a[1][col];
		for(int k = 2; k<= 5; k++)
		{
			if(a[k][col] < min)
			{	
				min = a[k][col];
				row = k;
			} 
		}
		
		if(row == i)
		{
			cout << row << " " << col << " " << a[row][col] << endl;
			flag += 1;
		}
		else
			flag += 0;
	}
	if(flag == 0)
		cout << "not found" << endl;
	return 0;
 }
int main()
{	int a[M][N], i, j, k, p, count=0; 
	
	for ( i = 0; i < M; i ++ )
	{
		for(j = 0; j < N; j++ )
		{
			scanf ( "%d", &a[i][j] );
		}
	}
	for ( i = 0; i < M; i ++ )	
	{
		p=0;
		for ( j = 0; j < N; j++ )
		{
			if(a[i][p]<a[i][j])
			{
				p=j;	
			}
		}
		for ( k=0; k<M; k++)
		{
			if(a[i][p]>a[k][p])
			{
				break;
			}
		}
		if(k==M)
		{
	      printf("%d %d %d\n",i+1,p+1,a[i][p]);
		count++;
		}
	}
	if(count==0)
	{
		printf("not found\n");
	}
	return 0;
}
int main()
{
	int c[6][6], a[6], b[6], i, j, n = 0;//??a??????????????b????????????n???????? 
	for (i = 1; i <= 5; i++)
	  for (j = 1; j <= 5; j++)
	    cin >> c[i][j];
	for (i = 1; i <= 5; i++)
	{
		a[i] = 1;
		b[i] = 1;
		for (j = 2; j <= 5; j++)
		{
			if (c[i][j] > c[i][a[i]])
			  a[i] = j;
			if (c[j][i] < c[b[i]][i])
			  b[i] = j;
		}
	}
	for (i = 1; i <= 5; i++)
	  if (b[a[i]] == i)
	    {
	    	cout << i << ' ' << a[i] << ' ' << c[i][a[i]] << endl;
			n++; 
	    }
	if (n == 0)
	  cout << "not found";
	return(0);
}
int main()  //?????
{
	int a[6][6],line,row,flag=0;
	for (int i=1;i<=5;i++)
	{	
		for (int t=1;t<=5;t++)
			cin >> a[i][t];
	}
	for (int k=1;k<=5;k++)
	{			
		int count=0,max=0;
		for (int p=1;p<=5;p++)
		{
			row = k;
			if (a[k][p]>max)
			{
				max=a[k][p];
				line = p;
			
			}
			
		}

		for (int q=1;q<=5;q++)
		{

			if (a[q][line]>=max)
			{
				count++;
			}
		}
			if (count==5)
			{
				flag++;
				cout << row << " " << line << " " << a[row][line] << endl;
			}
	}
	if (flag==0)
		cout << "not found" << endl;
	return 0;
}
/*
hw.cpp
????yang?
???????
???10.28
*/
int main()
{
	int a[6][6],s[6]={1,1,1,1,1,1},n[6]={1,1,1,1,1,1},h=0,l=0;//????????????s[]??n[]????h??l
	for(int i=1;i<=5;i++)
	{
		for(int j=1;j<=5;j++)
		{
			cin>>a[i][j];
		}
	}//????
	for(int i=1;i<=5;i++)
	{
		for(int j=1;j<=5;j++)
		{
			if(a[i][j]>a[i][s[i]])
			{s[i]=j;}
			if(a[n[j]][j]>a[i][j])
			{n[j]=i;}
		}
	}//?????????????
	for(int i=1;i<=5;i++)
	{
		if(s[n[i]]==i)//????
		{h=n[i];l=i;
		break;}
	}//????
	if(h*l==0) cout<<"not found"<<endl;//???????not found
	else cout<<h<<" "<<l<<" "<<a[h][l]<<endl;//?????????
	return 0;
}
int main()
{
	int a[5][5];
	int b[5][5];
	int max=0,min=100000;
	int p=0;
	for(int i=0;i<=4;i++)
		for(int j=0;j<=4;j++)
	cin >> a[i][j];
	memset(b,0,sizeof(b));
	for(int i=0;i<=4;i++)
	{
		max=0;
		for(int j=0;j<=4;j++)
			if(a[i][j]>max)
				max=a[i][j];
		for(int j=0;j<=4;j++)
			if(a[i][j]==max)
			{
				b[i][j]++;
				//cout <<"b"<<i<<j<<"="<<b[i][j];
			}
	}
	//cout << endl;
	for(int i=0;i<=4;i++)
	{
		min=100000;
		for(int j=0;j<=4;j++)
			if(a[j][i]<min)
				min=a[j][i];
		for(int j=0;j<=4;j++)
			if(a[j][i]==min)
			{
				b[j][i]++;
				//cout <<"b"<<j<<i<<"="<<b[j][i];
			}
	}
	for(int i=0;i<=4;i++)
		for(int j=0;j<=4;j++)
			if(b[i][j]==2)
			{
				cout << i+1 << " " << j+1 << " " <<a[i][j];
				p=1;
			}
	if(p==0)
		cout << "not found";
	return 0;
}
int main()
{
	int array[5][5],min[5],max[5],imax[5],imin[5];
	int i,j;
	char flag=0;
	for(i=0;i<5;i++)
		for(j=0;j<5;j++)
			cin>>array[i][j];
	for(i=0;i<5;i++)
	{
		imax[i]=array[i][0];
		max[i]=0;
		for(j=1;j<5;j++)
			if(array[i][j]>imax[i])
			{
				imax[i]=array[i][j];
				max[i]=j;
			}
	}
	for(j=0;j<5;j++)
	{
		imin[j]=array[0][j];
		min[j]=0;
		for(i=1;i<5;i++)
			if(array[i][j]<imin[j])
			{
				imin[j]=array[i][j];
				min[j]=i;
			}
	}
	for(i=0;i<5;i++)
		if(min[max[i]]==i)
		{
			cout<<i+1<<' '<<max[i]+1<<' '<<imax[i]<<endl;
			flag=1;
		}
	if(flag==0)
		cout<<"not found"<<endl;
	return 0;
}
int main()
{
int a[6][6],b[6],c[6],temp=0;
for(int i=1;i<6;i++)
  for(int j=1;j<6;j++)
    cin>>a[i][j];
for(int i=1;i<6;i++)
  {
   a[i][0]=-999999999;
   for(int j=1;j<6;j++)
      if(a[i][j]>a[i][0])
        {
         a[i][0]=a[i][j];
         b[i]=j;                  
        }
  }
for(int i=1;i<6;i++)
  {
   a[0][i]=999999999;
   for(int j=1;j<6;j++)
      if(a[j][i]<a[0][i])
        {
         a[0][i]=a[j][i];
         c[i]=j;                  
        }
  }
for(int i=1;i<6;i++)
   if(a[0][b[i]]==a[i][0])
     {
      cout<<i<<' '<<b[i]<<' '<<a[i][0];     
      temp=1;
     } 
if(temp==0)cout<<"not found";
cin.get();
cin.get();
return 0;
}
/*
 * ????05.cpp
 * ??:???
 * ????: 2012-11-06
 * ??:????
 */


int main() {
	int a[6][6], p = 1, flag = 1;            //?p??????????????;?flag???????
	for (int i = 1; i <= 5; i++) {           //???????????
		for (int j = 1; j <= 5; j++) {
			cin >> a[i][j];
		}
	}
	for (int i = 1; i <= 5; i++) {
		int ans = 1;
		for (int j = 1; j <= 5; j++) {
			if (a[i][p] < a[i][j]) {         //?????????i??????a[i][p]
				p = j;
			}
		}
		for (int k = 1; k <= 5; k++) {
			if (a[i][p] > a[k][p]) {         //??a[i][p]????p???????
				ans = 0;                     //?????ans=0;
			}
		}
		if (ans) {                           //?ans=1,?a[i][p]???????????????????????
			flag = 0;
			cout << i << ' ' << p << ' ' << a[i][p] << endl;
		}
	}
	if (flag) {                              //??flag=1,???????
		cout << "not found" << endl;
	}
	return 0;
}
main ()
{
  int a[5][5];
  int i,j,k,x=0,z,m=0,y,b=0;
  for(i=0;i<5;i++)
   {
		for(j=0;j<5;j++)
		scanf("%d",&a[i][j]);
   }
  for(i=0;i<5;i++)
   {
	 
      for(j=0;j<5;j++)
       {
	    	x=0;
		    for(k=0;k<5;k++)
		     {
			if(a[i][j]>a[i][k])
			x++;
		     }
		     if(x==4)
		     {
			m=0; 
			for(z=0;z<5;z++) 
			{
				if(a[i][j]<a[z][j])
				m++;
			}
			if(m==4)
			{
				y=a[i][j];
			printf("%d %d %d",i+1,j+1,y);
			b++;
		     }
		    } 
	     	else continue; 
      }
   }
   if(b==0)
   printf("not found");
}
int main()
{
	int a[5][5], max = 0, min = 9999999, i = 0,k = 0;
	for(i = 0; i < 5; i++)
		for(k = 0; k < 5; k++)
			cin>>a[i][k];
	for(i = 0; i < 5; i++)
		for(k = 0; k < 5; k++)
			{
				int n= 0;
				for(int q = 0; q < 5; q++)
				{
					if(a[i][k] >= a[i][q])
						n++;
					if(a[i][k] <= a[q][k])
						n++;
					if(n == 10)
						{
							cout << i + 1 << " " << k + 1 << " " << a[i][k] << endl;
							return 0;
						}
				}
			}
	cout << "not found" << endl;
	return 0;
}
int main(){
	int m,n,i,j,k=0;
    int result1=0,result2=0;
    int a[10][10];
for(i=0;i<5;i++){
		for(j=0;j<5;j++){
			scanf("%d",&a[i][j]);
		}
}
for(i=0;i<5;i++){
	for(j=0;j<5;j++){
		for(m=0;m<5;m++){
			if(a[i][j]<a[i][m])   {result1++;}  }
		for(n=0;n<5;n++){
			if(a[i][j]>a[n][j])  {result2++;}   }
			  if(result1==0&&result2==0)   {printf("%d %d %d",i+1,j+1,a[i][j]);}
			  else {k++;}
		result1=0;
		result2=0;
	}
}
		
if(k==25)	{printf("not found");}	
return 0;
}
int main(){
	int a[5][5];
	int min;
	int i,j,k,l,result=0;
	for(j=0;j<5;j++){
		for(i=0;i<5;i++){
			scanf("%d",&a[i][j]);
		}
	}
	for(i=0;i<5;i++){
		min=a[i][0];
		for(j=0;j<5;j++){
			if(a[i][j]<=min){
				min=a[i][j];
				k=j;
			}
		}
		for(l=0;l<5;l++){

			if(a[l][k]>a[i][k])break;
			if(l==4){
				result=1;
				printf("%d %d %d",k+1,i+1,a[i][k]);
			}

		}
	}
	if(result==0)printf("not found");	
	
	return 0;
}
int main()
{
	int a[5][5];
	int flag[5][5];
	for (int i=0;i<5;i++)
		for (int j=0;j<5;j++)
		{
			cin>>a[i][j];
			flag[i][j]=0;
		}
	for (int i=0;i<5;i++)
	{
		int max=0;
		for (int j=1;j<5;j++)
			if (a[i][max]<a[i][j]) max=j;
		flag[i][max]++;
	}
	for (int j=0;j<5;j++)
	{
		int min=0;
		for (int i=1;i<5;i++)
			if (a[min][j]>a[i][j]) min=i;
		flag[min][j]++;
	}
	for (int i=0;i<5;i++)
		for (int j=0;j<5;j++)
			if (flag[i][j]==2) 
			{
				cout<<i+1<<' '<<j+1<<' '<<a[i][j];
				return 0;
			}
	cout<<"not found";
	return 0;
}
//********************************
//*???????**
//*?????? **
//*???2012.11.05**
//********************************

int main() 
{  
    int a[5][5], flag = 0; //??5*5??a?flag???????? 
    for (int i = 0; i < 5; i++)//?????????? 
    {
        cin >> a[i][0] >> a[i][1] >> a[i][2] >> a[i][3] >> a[i][4];
    }//??????? 
    for (int r = 0; r < 5; r++)
    {
        int k = 0; //??k???????????
        for (int j = 1; j < 5; j++)//??????????? 
        {
            if (a[r][k] < a[r][j]) k = j;
        } //???????????k
        if (a[r][k] < a[(r + 4) % 5][k] &&
            a[r][k] < a[(r + 1) % 5][k] &&
            a[r][k] < a[(r + 2) % 5][k] &&
            a[r][k] < a[(r + 3) % 5][k])//????????????????5
        {
            flag = 1; //???????? 
            cout << r + 1 << " " << k + 1 << " " << a[r][k] << endl; //????????????? 
        }
    }
    if (flag == 0) cout << "not found" << endl; //????????not found 
     
    return 0;                     
}
main()
{
      int a[5][5];
      int x[5]={0};
      int y[5]={0};
      int i,j,k=0;
      for(i=0;i<5;i++)
      {
        for(j=0;j<5;j++)
        {
           scanf("%d",&a[i][j]);
        } 
      }
      for(i=0;i<5;i++)
      {
        int max=a[i][0];
        for(j=0;j<5;j++)
        {
           if(a[i][j]>max)
           {
             max=a[i][j];
             x[i]=j;
           }   
        } 
      }
      for(j=0;j<5;j++)
      {
        int min=a[0][j];
        for(i=0;i<5;i++)
        {
           if(a[i][j]<=min)
           {
             min=a[i][j];
             y[j]=i;
           } 
        } 
      }
      for(i=0;i<5;i++)
      {
        if(y[x[i]]==i)
        {
          k++;
          printf("%d %d %d\n",i+1,x[i]+1,a[i][x[i]]);
        } 
      }
      if(k==0)                                  
      printf("not found");

}
int main()
{
	int mat[5][5];                                                        //????mat??????
	int maxh[5]={0},l[5],minl[5]={100000,100000,100000,100000,100000},h[5];    //maxh?????????,l????????????,minl????????,h????????????
	for(int i=0;i<5;i++)
	{
		for(int j=0;j<5;j++)
		{
			cin>>mat[i][j];                                               //???????
			if(mat[i][j]>=maxh[i])                                        //??????
			{
				maxh[i]=mat[i][j];                                        //??????
				l[i]=j;                                                   //??????????
			}
			if(mat[i][j]<=minl[j])                                        //??????
			{
				minl[j]=mat[i][j];                                        //??????
				h[j]=i;                                                   //??????????
			}
		}
	}
	int tag=0;                                                            //tag?????????
	for(int k=0;k<5;k++)
	{
		if(h[l[k]]==k)                                                    //???????
		{
			cout<<k+1<<' '<<l[k]+1<<' '<<mat[k][l[k]]<<endl;              //????,??,???
			tag++;                                                        //tag?????
		}
	}
	if(!tag)                                                              //??????,??not found
	{
		cout<<"not found"<<endl;
	}
	return 0;
}
int main()
{
	int a[5][5],f=0,min=INT_MAX,temp,I=0;
	for(int i=0;i<5;i++)
		for(int j=0;j<5;j++)
			scanf("%d",&a[i][j]);
	do
	{
		for(int i=0;i<5;i++)
		{
			if(min>=a[i][f])
			{
				min=a[i][f];
				temp=i;
			}
		}
		for(int j=0;j<5;j++)
		{
			if(min<a[temp][j])
				break;
			if(j==4)
			{
				cout<<temp+1<<" "<<f+1<<" "<<min<<endl;
				I++;
			}
		}
		f++;
		min=INT_MAX;
	}while(f<5);
	if(I==0)
	{
		cout<<"not found"<<endl;
	}
	return 0;
}
int main()
{
	int a[6][6],b[6][6],c[6][6];//???????????,?????????
	int i=1,j=1,temp1=0,temp2=0;
	for (i=1;i<=5;i++)
	{
		for (j=1;j<=5;j++)
		{
			cin>>a[i][j];
			c[i][j]=b[i][j]=a[i][j];
		}
	}
	
	for (i=1;i<=5;i++)//???????????????????
	{
		for (j=1;j<=4;j++)
		{
			if (a[i][j]>a[i][j+1])
			{
				temp1=a[i][j];
				a[i][j]=a[i][j+1];
				a[i][j+1]=temp1;
			}
		}
	}//???,???a[i][j]?,?????????????a[i][5]????
	
	for (j=1;j<=5;j++)//???????????????????
	{
		for (i=1;i<=4;i++)
		{
			if (b[i][j]<b[i+1][j])
			{
				temp2=b[i][j];
				b[i][j]=b[i+1][j];
				b[i+1][j]=temp2;
			}
		}
	}//???,???b[i][j]?,?????????????b[5][j]????
	
	
	int flag=0;
	for (i=1;i<=5;i++)//?c[i][j]??????????
	{
		for (j=1;j<=5;j++)
		{
			if (c[i][j]==a[i][5]&&c[i][j]==b[5][j])//?????c[i][j]			
			{
				cout<<i<<" "<<j<<" "<<c[i][j]<<endl;
				flag++;
			}
		}
	}
	
	if (flag==0)
		cout<<"not found"<<endl;
	return 0;
}