semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
/**
* @file homework.cpp
* @author ???    1000062705
* @date 2010-11-8
* @description
* ??????:  ????.cpp: ??????
*/
int main()
{
    int a[5][5], i, j, k, max;
	int t1, t2, s = 0;
	for (i = 0; i < 5; i++)
		for (j = 0; j < 5; j++)
			cin >> a[i][j];                   //??5×5???
	for (i = 0; i < 5; i++)
	{
		max = a[i][0];                        //??????????????
		for (j = 0; j < 5; j++)
			if (max <= a[i][j])
			{
				max = a[i][j];                   //????????
			    t1 = i, t2 = j;              //???????????
			}
		for (k = 0; k < 5; k++)
			if (max <= a[k][t2])   continue;     //???????????????????
			else break;
		if(k == 5)  
			{
				cout << t1 + 1 << " " << t2 + 1 << " " << max <<endl;
				s++;                             //???????,???????1
		    }
	}
	if (s == 0)
		cout << "not found" << endl;
    return 0;
}
int main()
{
	int a[5][5];
	int i,j,s,d,k,l,time=0;
	for(i=0;i<=4;i++)
	{
		for(j=0;j<=4;j++)
		{
			scanf("%d",&a[i][j]);
		}
	}
	for(i=0;i<=4;i++)
	{
		s=a[i][0];d=0;
		for(j=1;j<=4;j++)
		{
			if(a[i][j]>=s)
			{
				s=a[i][j];
				d=j;
			}
		}
        l=a[i][d];
		for(k=0;k<=4;k++)
		{
			if(a[k][d]<=l)l=a[k][d];
		}
		if(l==a[i][d])
		{
			i++;d++;
			printf("%d %d %d",i,d,l);
			time++;
			i--;
		}
	}
	if(time==0)printf("not found");
	return 0;
}
int main()
{
	int a[6][6],i,j,p,q,max[6],min[6],t=0;
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		{
			scanf("%d",&a[i][j]);
		}
	}
    max[0]=a[0][0];
	min[0]=a[0][0];
	for(p=0;p<5;p++)
	{   
		for(q=0;q<5;q++)
		{
			if(max[p]<a[p][q])
			{
				max[p]=a[p][q];
			}
			if(min[q]>a[p][q])
			{
				min[q]=a[p][q];
			}
		}
	}
	for(p=0;p<5;p++)
	{   
		for(q=0;q<5;q++)
		{
    	    if(max[p]==min[q])
			{	
	        	printf("%d %d %d",p+1,q+1,a[p][q]);
		        t++;
			}
		}
	}
	if(t==0)
	{
		 printf("not found");
	}
	return 0;
}
int main()
{
	int a[5][5], i, k, l, m, n, flag;
	m=0;
	n=0;
	flag=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<4; k++)
		{
			if(a[i][k+1]>a[i][m])
				m=k+1;
		}
		for(l=0; l<5; l++)
		{
			if(a[l][m]<a[i][m])
			{	
				n=0;
				break;
			}
		    else n=1;
		}
		if(n==1) 
		{
			flag=1;
			cout << i+1 << " " << m+1 << " " << a[i][m] << endl;
		}
		m=0;
		
	}
	if(flag==0) cout << "not" << " " << "found" << endl;
	return 0;
}
main()
{
	int a[5][5],min[5],max[5];
	int i,j;
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		scanf("%d",&a[i][j]);
	}
	for(i=0;i<5;i++)
	{
		min[i]=a[0][i];
		max[i]=a[i][0];
	}
	for(i=0;i<5;i++)
	{
	 for(j=0;j<5;j++)
	 {
	 	if(a[i][j]>max[i]) max[i]=a[i][j];
	 	if(a[i][j]<min[j]) min[j]=a[i][j];
	 }
	}
	int k=0;
	for(i=0;i<5;i++)
	{
	 for(j=0;j<5;j++)
	 {
	 	if(max[i]==min[j])
	 	{
	 		printf("%d %d %d",i+1,j+1,max[i]);
	 		k++;
	 	}
	 }
	}
	if(k==0) printf("not found");
}
int main()
{
	int a[6][6];
	int i, j, y, max, flag ;
	for(i = 0; i < 5; i++)
		for(j = 0; j < 5; j++)
		{
			cin >> a[i][j];
		}	
	for(i = 0; i < 5; i++)
	{	
		max = a[i][0]; y = 1;
		for(j = 0; j < 5; j++)	
		{	
			if(a[i][j] > max)
			{
				max = a[i][j];
				 y = j + 1;
			}
		}
		flag = 1;
		for(int k = 0; k < 5; k++)
			if(a[k][y-1] < max) {flag = 0 ; continue;}
		if(flag == 1) { cout << i+1<<  " " << y << " " << max ; break;}
	}
	if(flag == 0) cout << "not found" ;
	return 0;

}
main()
{
    int mx[8],count=0;
    for(int i=1;i<=5;i++)mx[i]=0;
    int my[8] ;
    int a[8][8];
    for(int j=1;j<=5;j++)
        for(int i=1;i<=5;i++)
            {
                scanf("%d",&a[j][i]);
            }
    for(int h=1;h<=5;h++)
        for(int k=1;k<=5;k++)//heng
        {
            if(a[h][k]>=mx[h])mx[h]=a[h][k];

            //if(a[h][k]>=mx[h])mx[h]=a[h][k];
        }

            //=100000;
           for(int k=1;k<=5;k++)
                my[k]=1000000;
            for(int k=1;k<=5;k++)
                for(int h=1;h<=5;h++)
                if(a[h][k]<=my[k])my[k]=a[h][k];

     for(int j=1;j<=5;j++)
        for(int i=1;i<=5;i++)
            {
                if(a[j][i]==mx[j]&&a[j][i]==my[i])
                {
                    printf("%d %d %d",j,i,a[j][i]);
                    count=1;
                }
            }
    if(count==0)printf("not found");


}
main()
{
      int a[5][5];
      int i,j,l;
      for(i=0;i<5;i++)
      for(j=0;j<5;j++)
      scanf("%d",&a[i][j]);
      int count=0,max=0,min=0,temp;
      for(i=0;i<5;i++)
      {
              max=0;
              min=0;
              for(j=0;j<5;j++)
              {
                      if(a[i][j]>max)
                      {
                                     max=a[i][j];
                                     temp=j;
                      }
              }
              for(l=0;l<5;l++)
              {
                      if(a[i][temp]>a[l][temp]) break;
              }
              if(l==5) 
              {
                       printf("%d %d %d\n",i+1,temp+1,a[i][temp]);
                       count++;
              }
      }
      if(count==0) printf("not found\n");
}
int main()
{
   int a[5][5],p,i,b[5];
   for(i=0;i<5;i++){
      for(p=0;p<5;p++){
      scanf("%d",&a[i][p]);
   }
}
   for(i=0;i<5;i++){
	   for(p=0;p<5;p++){
		   if(a[i][p]>=a[i][0]&&a[i][p]>=a[i][1]&&a[i][p]>=a[i][2]&&a[i][p]>=a[i][3]&&a[i][p]>=a[i][4]){
			   b[i]=p;
		   }
	   }
   }
   if((a[0][b[0]]>=a[1][b[0]]||a[0][b[0]]>=a[2][b[0]]||a[0][b[0]]>=a[3][b[0]]||a[0][b[0]]>=a[4][b[0]])&&
	   (a[1][b[1]]>=a[0][b[1]]||a[1][b[1]]>=a[2][b[1]]||a[1][b[1]]>=a[3][b[1]]||a[1][b[1]]>=a[4][b[1]])&&
	   (a[2][b[2]]>=a[0][b[2]]||a[2][b[2]]>=a[1][b[2]]||a[2][b[2]]>=a[3][b[2]]||a[2][b[2]]>=a[4][b[2]])&&
	   (a[3][b[3]]>=a[0][b[3]]||a[3][b[3]]>=a[1][b[3]]||a[3][b[3]]>=a[2][b[3]]||a[3][b[3]]>=a[4][b[3]])&&
	   (a[4][b[4]]>=a[0][b[4]]||a[4][b[4]]>=a[1][b[4]]||a[4][b[4]]>=a[2][b[4]]||a[4][b[4]]>=a[3][b[4]])){
      printf("not found\n");
	   return 0;
   }
   for(i=0;i<5;i++){
      for(p=0;p<5;p++){
      if(a[i][p]>=a[i][0]&&a[i][p]>=a[i][1]&&a[i][p]>=a[i][2]&&a[i][p]>=a[i][3]&&a[i][p]>=a[i][4]){
    if(a[i][p]<=a[0][p]&&a[i][p]<=a[1][p]&&a[i][p]<=a[2][p]&&a[i][p]<=a[3][p]&&a[i][p]<=a[4][p]){
     printf("%d %d %d\n",i+1,p+1,a[i][p]);
    }
   }       
   }
}
return 0;
}
main()
{
      int a[6][6];
      int k[6],p[6];
      int i,j;
      for(i=0;i<5;i++)
        {
        for(j=0;j<5;j++)
        scanf("%d",&a[i][j]);
        }
      for(i=0;i<5;i++)
        {
        k[i]=a[i][0];
        for(j=1;j<5;j++)
        {
        if(a[i][j]>k[i])
        k[i]=a[i][j];
        }
        }
      for(j=0;j<5;j++)
        {
        p[j]=a[0][j];
        for(i=1;i<5;i++)
        {
        if(a[i][j]<p[j])
        p[j]=a[i][j];
        }
        }
       for(i=0;i<5;i++)
        {
        for(j=0;j<5;j++)
        {
         if(k[i]==p[j])
         printf("%d %d %d\n",i+1,j+1,k[i]);
        }
        }
        if(
          k[0]!=p[0]&&k[0]!=p[1]&&k[0]!=p[2]&&k[0]!=p[3]&&k[0]!=p[4]&&
          k[1]!=p[0]&&k[1]!=p[1]&&k[1]!=p[2]&&k[1]!=p[3]&&k[1]!=p[4]&&
          k[2]!=p[0]&&k[2]!=p[1]&&k[2]!=p[2]&&k[2]!=p[3]&&k[2]!=p[4]&&
          k[3]!=p[0]&&k[3]!=p[1]&&k[3]!=p[2]&&k[3]!=p[3]&&k[3]!=p[4]&&
          k[4]!=p[0]&&k[4]!=p[1]&&k[4]!=p[2]&&k[4]!=p[3]&&k[4]!=p[4]
        )
        printf("not found\n");
        
}
int main()
{
	int a[5][5],b[5][1],c[1][5];
	int i,j,max,min,leap=0;
	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];
		b[i][0]=0;
		for(j=1;j<5;j++)
		{
			if(a[i][j]>max)
			{
				max=a[i][j];
				b[i][0]=j;
			}
		}
	}
	for(j=0;j<5;j++)
	{
		min=a[0][j];
		c[0][j]=0;
		for(i=1;i<5;i++)
		{
			if(a[i][j]<min)
			{
				min=a[i][j];
				c[0][j]=i;
			}
		}
	}
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		{
			if(b[i][0]==j&&c[0][j]==i)
			{
				leap=1;
				printf("%d %d %d",i+1,j+1,a[i][j]);
				break;
			}
		}
	}
	if(leap==0)
	printf("not found");
}
int max(int a[5][5],int i)
{
	int k = 0;
	int p = 0;
	while(p<5)
	{
		if(a[i][p]>k)
			k = a[i][p];
		p++;
	}
	p = 0;
	while(p<5)
	{
		if(a[i][p] == k)
			return p;
		p++;
	}
}
int judge(int a[5][5],int y,int i)
{
	int j = 0;
	while(j<5)
	{
		if(j == i)
		{
			j++;
			continue;
		}
		else
		{
			if(a[j][y]<a[i][y])
				return 0;
		}
		j++;
	}
	return 1;
}
int main()
{
	int a[5][5];
	int x,y;
	for(int i = 0;i<5;i++)
		for(int j = 0;j<5;j++)
			scanf("%d",&a[i][j]);
	for(int i = 0;i<5;i++)
	{
		y = max(a,i);
		if(judge(a,y,i))
		{
			printf("%d %d %d", i+1,y+1,a[i][y]);
			return 0;
		}
	}
	printf("not found");
	return 0;
}
int main(){
int a[5][5];
int i,j,k,y,f,x;
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++){
y=a[i][0];
x=0;
for(j=1;j<5;j++){
if(a[i][j]>y){
y=a[i][j];
x=j;
}
}
for(f=0;f<5;f++){
if(a[i][x]>a[f][x]){
k=1;
}
}
if(k==0){
printf("%d %d %d",i+1,x+1,a[i][x]);
break;
}
k=0;
if(i==4){
printf("not found");
}
}
return 0;
}
//********************************************************
//*  ???:1.cpp                                        *
//*  ??????    1200012948                          *
//*  ????: 2012 11 05                                *
//*  ????:???????                             *
//********************************************************
//??
int main()
{
	int i, j, m, n = 0, a[5][5] = {{0},{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++)
		{
			m = a[i][j];
			//????
			if (m >= a[i][0] && m >= a[i][1] && m >= a[i][2] && m >= a[i][3] && m >= a[i][4] && m <= a[0][j] && m <= a[1][j] && m <= a[2][j] && m <= a[3][j] && m <= a[4][j])
			{
				cout << i + 1 << " " << j + 1 << " " << m << endl;     //??+1
				n++;

			}
		}
	}
	if (n == 0)
		cout << "not found" << endl;
	//??
	return 0;
}
int main()
{
	int a[5][5],i,j,k,g,h,max,flag=0;
	for(i=0;i<5;i++)
		for(j=0;j<5;j++)
			cin>>a[i][j];

	for(i=0;i<5;i++)
	{
		max=a[i][0];
		g=0;
		for(j=1;j<5;j++)
			if(a[i][j]>max)
			{
				max=a[i][j];
				g=j;
			}
		
		
		h=1;
		for(k=0;k<5;k++)
			if(a[k][g]<max)
			{
				h=0;
				break;
			}
		if(h==1)
		{
			cout<<i+1<<' '<<g+1<<' '<<a[i][g];
			flag=1;
		}
	}

	if(flag==0)
		cout<<"not found";
	return 0;
}
int main(){
	int a[5][5];
	int i,j,m,n,x,y,z,s;
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		{
			scanf("%d",&a[i][j]);
		}
	}
	s=0;
	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]))
			{
				if((a[i][j]<=a[0][j])&&(a[i][j]<=a[1][j])&&(a[i][j]<=a[2][j])&&(a[i][j]<=a[3][j])&&(a[i][j]<=a[4][j]))
				{
					x=i+1;
					y=j+1;
					printf("%d %d %d",x,y,a[i][j]);
					s++;
				}
			}
	}
	if(s==0)
		printf("not found");



	return 0;
}
int main()
{
int a[6][6],i,j,p,q,max[6],min[6],s=0;
for(i=0;i<5;i++)
{
for(j=0;j<5;j++)
{
scanf("%d",&a[i][j]);
}
}
    max[0]=a[0][0];
min[0]=a[0][0];
for(p=0;p<5;p++)
{   
for(q=0;q<5;q++)
{
if(max[p]<a[p][q])
{
max[p]=a[p][q];
}
if(min[q]>a[p][q])
{
min[q]=a[p][q];
}
}
}
for(p=0;p<5;p++)
{   
for(q=0;q<5;q++)
{
         if(max[p]==min[q])
{ 
         printf("%d %d %d",p+1,q+1,a[p][q]);
        s=s+1;
}
}
}
if(s==0)
{
 printf("not found");
}
return 0;
}
int main()
{
	int array[6][6]={0};
	int max[6]={0};
	for(int i=1;i<=5;i++)
		for(int j=1;j<=5;j++)
		{
			cin>>array[i][j];
			if(array[i][j]>array[i][max[i]])
				max[i]=j;
		}
	int have=0,result=0;
	for(int i=1;i<=5;i++)
	{
		int flag=1;
		for(int k=1;k<=5;k++)
		{
			if(array[k][max[i]]<array[i][max[i]])
			{
				flag=0;
				break;
			}
		}
		if(flag==1)
		{
			have=1;
			cout<<i<<" "<<max[i]<<" "<<array[i][max[i]]<<endl;
		}
	}
	if(!have)
		cout<<"not found"<<endl;
	return 0;
}
int main ()
{
    int a[5][5],max[5],min[5];
	int i,j,flag = 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++)
		{
			max[i] = a[i][0];
			min[j] = a[0][j];
		}
    for (i = 0;i < 5;i++)
		for (j = 0;j < 5;j++)
		{
		    if (a[i][j] >max[i] )
			{
			   max[i] = a [i][j];
			  			}
			if (a[i][j] < min[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+1 << " " << j+1 << " " << a[i][j];
				   flag = 1;
				   break;
				}
			}
			if (flag == 0)
				cout << "not found";
    return 0;
}
int main ()
{
    int a[5][5];
    int i,j,k,r,c[5],m,temp=0,d=0,count=0;
    for (i=0;i<5;i++)
    {
        for (j=0;j<5;j++)
        scanf ("%d",&a[i][j]);
    }
    for (j=0;j<5;j++)
    {
        m=a[j][0];
        c[d]=0;
        for (i=1;i<5;i++)
        {
            if (a[j][i]>m)
            {
                         m=a[j][i];
                         c[d]=i;                          
            }
            
        }//printf ("%d %d\n",j,c[d]);
        d++;
    } 
        for (i=0;i<5;i++)
         {
             for (k=0;k<5;k++)
             {
             if (a[k][c[i]]<a[i][c[i]])
             {
             temp=1;
             //printf ("%d %d\n",k,c[i]);
             break;
             }
             }
             if (temp==0)
         {printf ("%d %d %d\n",i+1,c[i]+1,a[i][c[i]]); 
         count=1;}
             temp=0;
         }
         if (count==0)
         printf ("not found");
               
        return 0;
}
/*
 *????HW6_05.cpp
 *??????1100019007?
 *???2012-11-05
 *???????
 */ 
 
int matrix[5][5];
int row[5];
int column[5];//??? 
int main()
{
    int i,j,max,min,flag;//??i,j,max,min 
    flag=0;
    for(i=0;i<5;i++)
    {
        for(j=0;j<5;j++)
        {
            cin>>matrix[i][j];//????
        }
    }
    for(i=0;i<5;i++)
    {
        row[i]=0;//????????
        max=matrix[i][0]; 
        for(j=0;j<5;j++)
        {
            if(matrix[i][j]>max)
            {
                max=matrix[i][j];//???????? 
                row[i]=j;
            }
        }
    }
    for(j=0;j<5;j++)
    {
        column[j]=0;//??????????
        min=matrix[0][j]; 
        for(i=0;i<5;i++)
        {
            if(matrix[i][j]<min)
            {
                min=matrix[i][j];//???????? 
                column[j]=i;
            }
        } 
    }
    for(i=0;i<5;i++)
    {
        if(column[row[i]]==i)//???????????????????? 
        {
            cout<<i+1<<" "<<row[i]+1<<" "<<matrix[i][row[i]]<<endl;//?? 
            flag=1;//flag?????? 
        } 
    }
    if(!flag)cout<<"not found"<<endl;
  return 0;//????
}
int main()
{
	int a[5][5];
	int i,j;
	int min[5],max[5];
	int pd=0;
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		{
			scanf("%d",&a[i][j]);
		}
	}
	for(j=0;j<5;j++){
		for (i=0;i<5;i++){
			if(i==0){
				min[j]=a[i][j];
				
			}
			else if(a[i][j]<min[j]){
				min[j]=a[i][j];
			
			}
		}
	}
	
	
	for(i=0;i<5;i++){
		for (j=0;j<5;j++){
			if(j==0){
				max[i]=a[i][j];
			}
			else if(a[i][j]>max[i]){
				max[i]=a[i][j];
			}
		}
	}
    for(j=0;j<5;j++){
		for (i=0;i<5;i++){
			if(max[i]==min[j]){
				pd=1;
				printf("%d %d %d",i+1,j+1,max[i]);
			}
		}
	}
	if (pd==0){
		printf("not found");
	}

return 0;}
int main()
{
	int n[5][5],i,j,max[5],flag,count=0;
	for(i=0;i<5;i++)
	{
		cin>>n[i][0];
		max[i]=0;
		for(j=1;j<5;j++)
		{
			cin>>n[i][j];
			if(n[i][max[i]]<n[i][j])
				max[i]=j;
		}
	}
	for(i=0;i<5;i++)
	{
		flag=0;
		for(j=0;j<5;j++)
		{
			if(n[j][max[i]]<n[i][max[i]])
			{
				flag=1;
				break;
			}
		}
		if(flag==0)
		{
			cout<<i+1<<' '<<max[i]+1<<' '<<n[i][max[i]]<<endl;
			count++;
		}
	}
	if(count==0)
		cout<<"not found"<<endl;
	return 0;
}
int main()
{
    int a[5][5];
    int i,j,x;
    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++)
    {
        int flag=1;
        for (x=0;x<5;x++)
        {
            if ((a[i][x]>a[i][j]) || (a[x][j]<a[i][j]))
            {
                flag=0; break;
            }
        }
        if (flag)
        {
            printf("%d %d %d",i+1,j+1,a[i][j]);
            return 0;
        }
    }
    printf("not found");
    return 0;
}
/*
 * homework1108.cpp
 *
 *  Created on: 2012-11-7
 *      Author: wangyinzhi
 */

int main(){
   int a[5][5],i,j,k,s,t,z;
   for(i=0;i<=4;i++){
	   for(j=0;j<=4;j++){
		   cin>>a[i][j];
	   }
   }
   z=0;
   for (i=0;i<=4;i++){
	   for(j=0;j<=4;j++){
		   s=0;t=0;
		   for(k=0;k<=4;k++){
		   if(a[i][j]>=a[i][k]){
			   s=s+1;//????????????
		   }
		   if(a[i][j]<=a[k][j]){
			   t=t+1;//???????????
		   }
		   }
		   if((s==5)&&(t==5)){//??????????
			   cout<<i+1<<" "<<j+1<<" "<<a[i][j]<<endl;
			   z=1;
		   }
	   }
   }
   if(z==0){
	   cout<<"not found"<<endl;//?????????????notfound
   }
    return 0;
}
/*******************************************************
// ?  ?: ????
// ?  ?: ?????? (5*5)??????????????????????? 
//         ?????????????????????????????????not found? 
//         ???????????????????????????????????
// ?  ?: ???  1200012861
// ?  ?: 2012?11?5?
*******************************************************/
int main()
{
	int array[5][5], i, j, k, flag = 1, flag2 = 0, max, row, col;
	for (i = 0; i <= 4; i++)
		for (j = 0; j <= 4; j++)
			cin >> array[i][j];
	for (i = 0; i <= 4; i++)
	{
		flag = 1;                                 //???????
		max = array[i][0];
		row = i;                                  //?????
		col = 0;                                  //?????
		for (j = 1; j <= 4; j++)                  //???i?????
		{
			if (max < array[i][j])
			{
				max = array[i][j];
				col = j;                          //???i????????
			}
		}
		for (k = 0; k <= 4; k++)
		{
			if (array[k][col] < array[row][col])  //???i??????????????
			{
				flag = 0;                         //??????
				break;
			}
		}
		if (flag)
		{
			cout << (row + 1) << " " << (col + 1) << " " << array[row][col] << endl;
			flag2 = 1;                            //??????????
		}
	}
	if (flag2 == 0)                               //?????
		cout << "not found" << endl;
	return 0;
}
/*
                 name:1000012827_1.cpp
				 author:liuchengdong
				 created time:20101106
				 function:output andian
**/
int main()
{
	int a[5][5] = {0}, b = 0, i = 0, j = 0, k = 0, g, m = 0;             //??????????????
	for(i = 0; i <= 4; i ++)                                             //for????????
		for(j = 0; j <= 4; j ++)
		{
			cin >> b; 
			a[i][j] = b; 
		}
		for(i = 0; i <= 4; i ++)
		{
			int c = -1, max = -1e10;                                     //??????max???????????????????-1
			for(j = 0; j <= 4; j ++)                                     //for??????????
			{
				if(max < a[i][j])
				{
					max = a[i][j];                                       //???????max
					c = j;                                               //?????
				}
			}
			for(k = 0; k <= 4; k ++)                                     //for??????????????
			{
				g = -1;                                                  //??g????
				if(max > a[k][c])
				{
					g = 0;                                               //???????????g???
					break;                                               //??????
					}
				} 
				int row = -1;                                            //????????-1
				if(g == -1)                                              //?k??????????
				{ 
					row = i;                                             //???????
					m = 1;                                               //?????????
					cout << row + 1 << " " << c + 1 << " " << max << endl; 
				} 
		}
		if(m == 0)                                                       //??????????????
			cout << "not found" << endl; 
		return 0; 
}
int main()
{
	int a[5][5], k=0, i=0, j=0, M[5]={0}, m[5]={0},t[5]={0};
	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=0; j<5; j++)
		{	
			if(M[i]<=a[i][j])
			{
				M[i]=a[i][j];
				t[i]=j;	
			}
		}	
	}
	for(j=0; j<5; j++)
	{
		m[j]=a[0][j];
		for(i=0; i<5; i++)
		{			
			if(m[j]>=a[i][j])
			{
				m[j]=a[i][j];				

			}
		}	
	}
	for(i=0; i<5; i++)
		{
			if(m[t[i]]==M[i])
			{
				cout<<i+1<<' '<<t[i]+1<<' '<<M[i]<<endl;
			}
			else
				k++;
		}
			if(k==5)
				cout<<"not found"<<endl;
		return 0;
}
int main()
{
	int a[5][5];int i=0,j=0,k=0;int b=0,result=1,sum=0;//??????a??????????????????i,j,k??????0???????b,????????????result?????????????sum,??????????????0,1,0?
	for(i=0;i<5;i++) //????????
	{
		for(j=0;j<5;j++)
		{
			cin>>a[i][j];
		}
	}
	for(i=0;i<5;i++) //?????????????
	{
		b=a[i][0];
		for(j=0;j<5;j++) //??????????
		{
			if(b<a[i][j])
			{
				b=a[i][j];
			}
		}
		for(j=0;j<5;j++) //?????????
		{
			if(a[i][j]==b)
			break;
		}
		for(k=0;k<5;k++) //??????????????,??????1?
		{
			if(b>a[k][j])
			{
				result=0;
			}
		}
		if(result==1) //?????????????????
		{
			cout<<i+1<<" "<<j+1<<" "<<b<<endl;
			sum++;
		}
		result=1;
	}
	if(sum==0) //????????not found;
	{
		cout<<"not found"<<endl;
	}
	return 0;
}
int main() {
	int sz[5][5];
	int max[5];
	int min[5];
	int i,j,k=0;
	for(i=0;i<5;i++){
		for(j=0;j<5;j++){
			scanf("%d",&sz[i][j]);
		}
	}
	for(i=0;i<5;i++){
		max[i]=sz[i][0];
		min[i]=sz[0][i];
	}
	for(i=0;i<5;i++){
		for(j=0;j<5;j++){
			if(sz[i][j]>max[i]){
				max[i]=sz[i][j];
			}
			if(sz[i][j]<min[j]){
				min[j]=sz[i][j];
			}
		}
	}
	for(i=0;i<5;i++){
		for(j=0;j<5;j++){
			if(max[i]==min[j]){
				printf("%d %d %d\n",i+1,j+1,sz[i][j]);
				k++;
			}
		}
	}
	if(k==0){
		printf("not found");
	}
	return 0;
}
int main()
{
	int sz[5][5];
	int i,j;
	for(i=0;i<5;i++){
		for(j=0;j<5;j++){
			scanf("%d",&sz[i][j]);
		}
	}
	int max,min,m;
	for(i=0;i<5;i++){
		max=sz[i][0];
		m=0;
		for(j=1;j<5;j++){
			if(sz[i][j]>max){
				max=sz[i][j];
				m=j;
			}
		}
		min=sz[i][m];
    	for(j=0;j<5;j++){
	        if(sz[j][m]<min){
			    break;
			}
		}
		if (j==5){
		    printf("%d %d %d\n",i+1,m+1,min);
			return 0;
		}
		
	}
	printf("not found");
	return 0;
}
int main()
{
int t=0,i,j,a[6][6],q=0,d=0;
for (i=1;i<=5;i++)
{
  for (j=1;j<=5;j++)
  {
      scanf("%d",&a[i][j]);
   }
}
for (i=1;i<=5;i++)
{
 for (j=1;j<=5;j++)
 {
  for (t=1;t<=5;t++)
  {
  if (a[i][j]>=a[i][t]&&a[i][j]<=a[t][j])
   d++;
  }
  if (d==5)
 {
      printf("%d %d %d\n",i,j,a[i][j]);
  q=1;
}
  else if (i==5&&j==5&&q!=1)
  printf("not found");
  d=0;
 }
}

}
void main()
{
   int i,j,t=0,n=0,m,ii=0,jj=0,p=0;
   int c[5][5];
   for(i=0;i<5;i++)
   {
       for (j=0;j<5;j++)
       scanf("%d",&c[i][j]);
   }
      for(i=0;i<5;i++)
      {
          for(j=1,t=c[i][0];j<5;j++)
          if(t<c[i][j]) t=c[i][j];
          for(j=0;j<5;j++)
          {
              if(c[i][j]==t)
              {ii=i+1;jj=j+1;break;}
          }
          for(p=0,m=0;p<5;p++)
          if(t<=c[p][j]) m++;
          if(m==5) printf("%d %d %d",ii,jj,t);
          else n++;
          if(n==5) printf("not found");
      }
}
//*******************
// 7.1.cpp 
// ??  1200018415
// 2012  11  5
//*******************


int main()
{
	int i, j, a[5][5];
	int k,c, n = 0, p = 0, m = 0;
	int j1,i1;
	for (i = 0; i <= 4; i++)
		for (j = 0; j <= 4; j++)
			cin >> a[i][j];
	for (i = 0; i <= 4; i++)
	{
		for (j = 0; j <= 4; j++)
		{
			if (m < a[i][j])
			{
				m = a[i][j];
				j1 = j;
			}
		}
		for (k = 0; k <= 4; k++)
		{
			if (a[k][j1] < m)
			{
				p = 1;
				break;
			}
		}
		if ( p == 0)
		{
			cout << i + 1 << " " << j1 + 1 << " " << m << endl;
			n = 1;
		}
		m = 0;
		p = 0;
	}
	if (n == 0)
		cout << "not found" << endl;

	return 0;
}
int main()
{
    int s[6][6]={0};                              //s[6][6]??????????????????????????????
    int i,j,w=0;
    for(i=0;i<=4;i++)               //???? 
    {
           for(j=0;j<=4;j++)
           {
               cin>>s[i][j];                 
           }                 
    } 
    for(i=0;i<=4;i++)           //???????? ??????? 
    {
          s[i][5]=s[i][0];
          for(j=1;j<=4;j++)
          {
             if(s[i][5]<s[i][j])
              s[i][5]=s[i][j];             
          }             
    }
    for(i=0;i<=4;i++)              //???????? 
    {
          s[5][i]=s[0][i];
          for(j=1;j<=4;j++)
          {
             if(s[5][i]>s[j][i])
              s[5][i]=s[j][i];             
          }                 
    }
    for(i=0;i<=4;i++)
    {
         for(j=0;j<=4;j++)
         {
             if((s[i][j]==s[i][5])&&(s[i][j]==s[5][j]))
             {cout<<i+1<<" "<<j+1<<" "<<s[i][j];w=1;}             
        }                 
    }
    
    if(w==0)
    cout<<"not found";
    
    
    
    
return 0;    
}