semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int a1,a2,a3,a4,a5,a6,a7,a8,a9,a10;
int a[100];
char c[100];

int main()
{
    int judge1,judge2;
    judge1=judge2=0;
    int count=0;
    int a[5][5];
    int i,j;
    for(i=0;i<=4;i++)
    {
        for(j=0;j<=4;j++)
        {
            scanf("%d",&a[i][j]);
        }
    }
    for(a1=0;a1<=4;a1++)
    {
        for(a2=0;a2<=4;a2++)
        {
            judge1=judge2=0;
            for(a3=0;a3<=4;a3++)
            {
                if(a[a1][a3]>a[a1][a2])
                {
                    break;
                }
                if(a3==4)
                {
                    judge1=1;
                }
            }
            for(a4=0;a4<=4;a4++)
            {
                if(a[a4][a2]<a[a1][a2])
                {
                    break;
                }
                if(a4==4)
                {
                    judge2=1;
                }
            }
            if(judge1==1&&judge2==1)
            {
                printf("%d %d %d",a1+1,a2+1,a[a1][a2]);
                count++;
            }
        }
    }
    if(count==0)
    {
        printf("not found")
        ;
    }
}
int main() {
	int number[5][5];
	int i=0;
	int j=0;
	int y[5];
	int p=0;
	while(i<5)
	{
		scanf("%d %d %d %d %d/n", &number[i][0], &number[i][1], &number[i][2], &number[i][3], &number[i][4]);
		
		i++;
	}
	i=0;
	j=0;
	int hang[5];
	int lie[5];
	int x[5];
	while(i<5)
	{
		x[i]=number[i][0];
		while(j<5)
		{
			if(number[i][j]>=x[i])
			{
				hang[i]=i;
				lie[i]=j;
				x[i]=number[i][j];
			}
			j++;
		}
		i++;
		j=0;
	}
	i=0;
	j=0;
	
	j=lie[0];
	y[j]=number[0][j];
		while(i<5)
		{
		    if(number[i][j]<y[j])
			   {
				   y[j]=number[i][j];
			   }
			   i++;
		}
		if(x[0]==y[j])
		{
			printf("%d %d %d", (hang[0]+1),(lie[0]+1),x[0]);
		}
		else
			p++;


	i=0;
	j=0;
    j=lie[1];
	y[j]=number[1][j];
		while(i<5)
		{
		    if(number[i][j]<y[j])
			   {
				   y[j]=number[i][j];
			   }
			   i++;
		}
		if(x[1]==y[j])
		{
			printf("%d %d %d", (hang[1]+1),(lie[1]+1),x[1]);
		}
		else
			p++;

   i=0;
   j=0;
   j=lie[2];
	y[j]=number[2][j];
		while(i<5)
		{
		    if(number[i][j]<y[j])
			   {
				   y[j]=number[i][j];
			   }
			   i++;
		}
		if(x[2]==y[j])
		{
			printf("%d %d %d", (hang[2]+1),(lie[2]+1),x[2]);
		}
		else
			p++;

   i=0;
   j=0;
   j=lie[3];
	y[j]=number[3][j];
		while(i<5)
		{
		    if(number[i][j]<y[j])
			   {
				   y[j]=number[i][j];
			   }
			   i++;
		}
		if(x[3]==y[j])
		{
			printf("%d %d %d", (hang[3]+1),(lie[3]+1),x[3]);
		}
		else
			p++;

   i=0;
   j=0;
   j=lie[4];
	y[j]=number[4][j];
		while(i<5)
		{
		    if(number[i][j]<y[j])
			   {
				   y[j]=number[i][j];
			   }
			   i++;
		}
		if(x[4]==y[j])
		{
			printf("%d %d %d", (hang[4]+1),(lie[4]+1),x[4]);
		}
		else
			p++;
		if(p==5)
		{
			printf("not found");
		}

			return 0;
	}
int main()
{int h[5][5],m,q,n=0;
for(int i=0;i<=4;i++)
  {for(int j=0;j<=4;j++)
  {
	scanf("%d",&(h[i][j]));}
  }

for(int x=0;x<=4;x++)
  {
	 for(int y=0;y<=4;y++)
     {
	    if((h[x][y]>=h[x][1])&&(h[x][y]>=h[x][2])&&(h[x][y]>=h[x][0])&&(h[x][y]>=h[x][3])&&(h[x][y]>=h[x][4]))
          {
			if((h[x][y]<=h[0][y])&&(h[x][y]<=h[1][y])&&(h[x][y]<=h[2][y])&&(h[x][y]<=h[3][y])&&(h[x][y]<=h[4][y]))
	        {n++;printf("%d %d %d",x+1,y+1,h[x][y]);}
		   }
      }	
  }
 if(n==0){printf("not found");} 

return 0;
}
int main()
{
    int a[5][5];
	int max[5]={0,0,0,0,0},k[5]={0,0,0,0,0},r[5]={0,0,0,0,0};
	int i=0,j=0,flag=0,t=0;
	for(i=0;i<=4;i++)
	{
		for(j=0;j<=4;j++)
		{
			cin>>a[i][j];
			if(max[i]<a[i][j])
			{
				max[i]=a[i][j];
				k[i]=j;
			}
		}
	}
	for(i=0;i<=4;i++)
	{
		for(j=0;j<=4;j++)
		{
			flag=1;
			if(max[i]>a[j][k[i]])
			{
				flag=0;
				break;
			}
		}
		if(flag==1)
		{
		    t++;
			r[t]=max[i];
		    break;
		}
	}
    if(flag==1)
		cout<<i+1<<" "<<k[i]+1<<" "<<r[1]<<endl;
	else 
		cout<<"not found"<<endl;
	return 0;
}
int main()
{
	int a[5][5],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++)
	{
		for(j=0;j<5;j++)
		{
			int m,f=1;
			for(m=0;m<5;m++)
			{
				f=f*(a[i][j]>=a[i][m]);
			}
			if(f!=0)
			{
				int s,t=1;
				for(s=0;s<5;s++)
				{
					t=t*(a[i][j]<=a[s][j]);
				}
				if(t!=0)
				{
					printf("%d %d %d",i+1,j+1,a[i][j]);
					return 0;
				}
			}
		}
	}
	printf("not found");
	return 0;
}
int main()
{
    int i,j,t,s=0;
    int a[5][5],b[5],c[5],d[5];
    for(i=0;i<5;i++){
                     for(j=0;j<5;j++){
                                      scanf("%d",&a[i][j]);
                                      }
                     }
    for(i=0;i<5;i++){
                      b[i]=a[i][0];
                      for(j=0;j<5;j++){
                                      if(a[i][j]>=b[i]){
                                                     b[i]=a[i][j];
                                                     d[i]=j;
                                                     }
                                      }
                      
                     }
    for(j=0;j<5;j++){
                      c[j]=a[0][j];
                      for(i=0;i<5;i++){
                                      if(a[i][j]<=c[j]){
                                                     c[j]=a[i][j];
                                                     }
                                      }
                     }
    for(i=0;i<5;i++){
                      t=d[i];
                      if(b[i]==c[t]){
                                     printf("%d %d %d",i+1,t+1,b[i]);
                                     s=s+1;
                                     }
                      }
    if(s==0){
             printf("not found");
             }
return 0;
}
//********************************
//*???????   **
//*?????? 1300012861 **
//*???2013.11.01  **
//********************************
int main()
{
	int a[7][7], i, j, max, l, k, count, s, t;
	count = 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]; //???????????
		k = 0; 
		for ( j = 1; j < 5; j++ ) //????
		{
			if ( a[i][j] > max ) //????????
			{
				max = a[i][j]; //?????
				k = j; //????????
			} 
		}
		for ( l = 0; l < 5; l++ ) //?????????
		{
			if ( a[i][k] > a[l][k] ) //????????
				break; //????
		} 
		if ( l == 5 ) //???????
		{
			count++; //??????
			s = i + 1; //????
			t = k + 1; //????
		} 
	}
	if ( count != 0 ) //?????
		cout << s << " " << t << " " << a[s - 1][t - 1] << endl;
	else
		cout << "not found" << endl;
	return 0;
}
int main()
{
	int s[5][5],i,k,a=0,b=0,h,j;
	for(i=0;i<5;i++)
	{
		for(k=0;k<5;k++)
		{
			scanf("%d",&(s[i][k]));
		}
	}
	for(k=0,a=0;k<5;k++)
	{
		for(i=0;i<5;i++)
		{
			if((s[i][k]<=s[0][k])&&(s[i][k]<=s[1][k])&&(s[i][k]<=s[2][k])&&(s[i][k]<=s[3][k])&&(s[i][k]<=s[4][k]))
			{
				break;
			}
		}
		if((s[i][k]>=s[i][0])&&(s[i][k]>=s[i][1])&&(s[i][k]>=s[i][2])&&(s[i][k]>=s[i][3])&&(s[i][k]>=s[i][4]))
		{
			a++;
			h=i+1;
			j=k+1;
			printf("%d %d %d",h,j,s[i][k]);
		}
	}
	if(a==0)
	{
		printf("not found");
	}
	return 0;
}
int main()
{
	int a[5][5];
	int i,j;
	for(i=0;i<5;i++)
		for(j=0;j<5;j++)
			scanf("%d",&a[i][j]);
	int row,col,max;
	for(i=0;i<5;i++)
	{
		max = 0;
		for(j=0;j<5;j++)
		{
			if(a[i][j]>=max) 
			{
				max=a[i][j];    row=i;     col=j;
			}
		}
		for(j=0;j<5;j++)
		{
			if(max > a[j][col])   break;
		}
		if(j==5)
		{
			printf("%d %d %d",row+1,col+1,max);
			return 0;
		}
	}
	printf("not found\n");
	return 0;
}
int max(int a,int b)
{
  int x;
  x=a>b ? a:b;
  return x;
}
int min(int a,int b)
{
  int x;
  x=a<b ? a:b;
  return x;    
}  

main()
{
int a[5][5];
int b[5],c[5];
int i,j,r=0;
for(i=0;i<5;i++)
  {   for(j=0;j<5;j++)
      scanf("%d",&a[i][j]);  }

printf("\n");  
for(i=0;i<5;i++)      
  b[i]=max(a[i][0],max(a[i][1],max(a[i][2],max(a[i][3],a[i][4]))));
for(j=0;j<5;j++)      
  c[j]=min(a[0][j],min(a[1][j],min(a[2][j],min(a[3][j],a[4][j]))));

for(i=0;i<5;i++)
  {
     for(j=0;j<5;j++)
       {
          if(b[i]==c[j]) 
          {
            printf("%d %d %d",i+1,j+1,b[i]);
            r=1;
          } 
       }   
  }          
if(r==0)  printf("not found");
}
int main()
{
   int i,j;
   int lineMax[5] = {0};
   int columnMin[5];
   int matrix[5][5];
   for( i = 0; i < 5; i++ )
	   for( j = 0; j < 5; j++ )
		   scanf( "%d", &matrix[i][j] );

   for( i = 0; i < 5; i++ )
   {
	   int max = 0;
	   for( j = 1; j < 5; j++ )
	   {
		   if( matrix[i][j] > matrix[i][max] )
			   max = j;
	   }
	   lineMax[i] = max;
   }

   for( i = 0; i < 5; i++ )
   {
	   int min = 0;
	   for( j = 1; j < 5; j++ )
	   {
		   if( matrix[j][i] < matrix[min][i] )
			   min = j;
	   }
	   columnMin[i] = min;
   }
   
   int record[5];
   int len = 0;
   for( i = 0; i < 5; i++ )
   {
	   if( columnMin[ lineMax[i] ] == i )
	   {
		   record[len] = i;
		   len++;
	   }
   }

   if( len == 0 )
	   printf( "not found\n" );
   else
   {
	   for( i = 0; i < len; i++ )
	   {
		   int line = record[i];
		   int column = lineMax[record[i]];
		   printf("%d %d %d\n",(line+1),(column+1),matrix[line][column]);
	   }
   }
   return 0;
}
int main()
{
	int a[5][5];
	int i,j,max,min,x,y,n=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];y=0;

	  for(j=0;j<5;j++)
	  if(a[i][j]>max)
	  { max=a[i][j];  y=j;}
	  min=a[i][y];
	  x=i;
	  for(j=0;j<5;j++)
		  if(min>a[j][y])
		  {  x=j;min=a[j][y];}
	  if(i==x) { cout<<x+1<<' '<<y+1<<' '<<a[x][y];  break;}
	  n++;
	 if(n==5&&i!=x)  cout<<"not found";
	}
  return 0;


}
int maxi(int b,int c,int d,int e,int f);
int mini(int b,int c,int d,int e,int f);
int main()
{
	int a[5][5],m,n,sum=0;
	for(m=0;m<5;m++)
     {
		for(n=0;n<5;n++)
		{	
			scanf("%d",&a[m][n]);
		}
     
     }
     for(m=0;m<5;m++)
     {
		for (n=0;n<5;n++)
		{
			if((a[m][n]==maxi(a[m][0],a[m][1],a[m][2],a[m][3],a[m][4]))&&(a[m][n]==mini(a[0][n],a[1][n],a[2][n],a[3][n],a[4][n])))
			{
				printf("%d %d %d\n",m+1,n+1,a[m][n]);
				sum++;
			}
				
		}	
	}
	if(sum==0)
	printf("not found");
     return 0;
}
  
int maxi(int b,int c,int d,int e,int f)
{
	if(b>c)
	c=b;
	if(c>d)
	d=c;
	if(d>e)
	e=d;
	if(e>f)
	f=e;
	return f;
		} 
int mini(int b,int c,int d,int e,int f)
{
	if(b<c)
	c=b;
	if(c<d)
	d=c;
	if(d<e)
	e=d;
	if(e<f)
	f=e;
	return f;
		}
int main()
{
	int max,min;
	int sz[100][100],m[100],n[100],s;
	max=0;
	min=35500;
	s=0;
	for(int i=0;i<5;i++)
	{
		for(int k=0;k<5;k++)
		{
			scanf("%d",&sz[i][k]);
			if(max<sz[i][k])
			{
				max=sz[i][k];
			}	
		}
		m[i]=max;
		max=0;
	}
	for(int p=0;p<5;p++)
	{
		for(int q=0;q<5;q++)
		{
			if(min>sz[q][p])
			{
				min=sz[q][p];
			}
		}
		n[p]=min;
		min=100000;
	}
	for(int x=0;x<5;x++)
	{
		for(int y=0;y<5;y++)
		{
			if(sz[x][y]==m[x]&&sz[x][y]==n[y])
			{			
				s++;
				printf("%d %d %d",x+1,y+1,sz[x][y]);

			}
		}
	}
	if(s==0)
		printf("not found");
return 0;
}
/**
* file homwork.cpp
* author ??? 1100012722
* data 2011-10-29
* description ????
*/ 
int main()
{
 int a[6][6];
 int i , j ;
 int k , m ;            //????????
 int flag;
 flag = 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(k = 1 ; k <= 5 ; k ++)
		{
			if(a[i][k] > a[i][j]) break;
		}
     	        if(k == 6)
		{
			for(m = 1 ; m <= 5 ; m ++)
			{
				if(a[m][j] < a[i][j]) break;
			}
			if(m == 6)
			{	
				printf("%d %d %d",i,j,a[i][j]);
				flag = 1;
			}
		}
	}
 }
	if(flag == 0)
	printf("not found");
	return 0;
}
int main()
{
	int a[5][5],b[5][5],maxh[5],minl[5];
	int i,j,k=0;
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
	       { scanf("%d",&a[i][j]);
		     b[i][j]=a[i][j];}
	}
	for(i=0;i<5;i++)
	{
		maxh[i]=a[i][0];
		for(j=1;j<5;j++)
			maxh[i]=maxh[i]>a[i][j]?maxh[i]:a[i][j];
	}
	for(i=0;i<5;i++)
	{
		minl[i]=a[0][i];
		for(j=1;j<5;j++)
			minl[i]=minl[i]<a[j][i]?minl[i]:a[j][i];
	}
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		{
			if(maxh[i]==minl[j])
			{printf("%d %d %d",i+1,j+1,maxh[i]);k=1;}
		}
	}
	if(k==0)
	{
		printf("not found");
	}
}
int main()
{
	int a[5][5];
	int i,j,max,min,lie=0,m=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];
		lie=0;
		for(j=0;j<5;j++)
		{
			if(a[i][j]>max)
			{
				max=a[i][j];
				lie=j;
			}
		}	
		min=a[0][lie];
		for(j=0;j<5;j++)
		{
			if(a[j][lie]<min)
			min=a[j][lie];
		}
		if(min==a[i][lie])
		{
			printf("%d %d %d\n",i+1,lie+1,a[i][lie]);
			m=1;
		}
	}
	if(m==0)
	printf("not found\n");
	
	return 0;
}
int main()
{
    int a[5][5],i,j,g[5]={0},sum[5],t[5],k,m=0;
    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,sum[i]=a[i][0],t[i]=0;j<=4;j++)
        {
            if(sum[i]<a[i][j])
            {
                sum[i]=a[i][j];
                t[i]=j;
            }
        }
        for(k=0;k<=4;k++)
        {
            if(sum[i]<a[k][t[i]])
            g[i]++;
        }
        if(g[i]==4)
        {
            m=1;
            cout << i+1 << " "<< t[i]+1 << " " << sum[i] << endl;
        }
     }
     if(m==0)
     cout << "not found";
     return 0;
}
int findmin(int a[5])
{
int x=a[0],y=0;
for (int i=1;i<5;i++)
   if (a[i]<x) {x=a[i];y=i;}
return y;
}

int findmax(int a[5])
{
int x=a[0],y=0;
for (int i=0;i<5;i++)
   if (a[i]>x) {x=a[i];y=i;}
return y;
}

int main()
{
int a[5][5],b[5][5],max[5],min[5],pp=0;
for (int i=0;i<5;i++)
   for (int j=0;j<5;j++)
   {scanf("%d",&a[i][j]);b[j][i]=a[i][j];}
for (int i=0;i<5;i++)
   {
   max[i]=findmax(a[i]);
   min[i]=findmin(b[i]);
   }
for (int i=0;i<5;i++)
   if (i==min[max[i]]) {printf("%d %d %d",i+1,max[i]+1,a[i][max[i]]);pp=1;}
if (pp==0) printf("not found");
}
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 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);
}
main()
{
     int a[5][5],i,j,t=0;
     for(i=0;i<=4;i++)
     {
                      for(j=0;j<=4;j++)
                      scanf("%d",&a[i][j]);
                      }
     for(i=0;i<=4;i++)
     {
                      for(j=0;j<=4;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]))
                      {
                      printf("%d %d %d",i+1,j+1,a[i][j]);
                      t=1;
                      break;
                      }
                      }
if(t==1)
break;
                      }
                      if(t!=1)
                      printf("not found");

      }
int main()
{
    int i,j,k,t=0,x,y,a[5][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++)
    {
        x=a[i][0]; y=0;
        for (j=0;j<5;j++)
        {
            if (a[i][j]>x)   {x=a[i][j]; y=j;}
        }
        for (k=0;k<5;k++)
        {
            if (a[k][y]<x)   {x=0;break;}
        }
        if (x!=0)  {printf("%d %d %d",i+1,y+1,x); t=1;}
    }
    if(t==0) printf("not found");
    getchar();
    getchar();
    getchar();
    return 0;
}
//*******************************************************
//*       ????1000012846_1.cpp                      *
//*       ?????                                    *
//*       ?????2010?11?                          *
//*       ?????????                            *
//*******************************************************
int main()
{
	int a[5][5];
	int i = 0 , j = 0 , i1 = 0 , j1 = 0 , m = 0 ;
	for( i = 0 ; i < 5 ; i++ )
	{
		for( j = 0 ; j < 5 ; j++ )                       //??????
			cin >> a[i][j] ;
	}
	for( i1 = 0 ; i1 < 5 ; i1++ )
	{
		for( j1 = 0 ; j1 < 5 ; j1++ )
		{
			if( a[i1][j1] >= a[i1][0] && a[i1][j1] >= a[i1][1] && a[i1][j1] >= a[i1][2] && a[i1][j1] >= a[i1][3] && a[i1][j1] >= a[i1][4] )          //????
				if( a[i1][j1] <= a[0][j1] && a[i1][j1] <= a[1][j1] && a[i1][j1] <= a[2][j1] && a[i1][j1] <= a[3][j1] && a[i1][j1] <= a[4][j1] )      //????
				{
					cout << i1 + 1 << " " << j1 + 1 << " " << a[i1][j1] << endl ;               //??   
					m++;
					break;
				}
			if( m != 0 )
				break;
		}
		if( m != 0 )
			break;
	}
	if( m == 0 ) 
		cout <<  "not found" << endl;                                               //??
	return 0;
}
int main()
{int a[5][5],m,n,w=0;
for(m=0;m<=4;m++)
{
for(n=0;n<=4;n++)
scanf("%d",&a[m][n]);
}
for(m=0;m<=4;m++)
{
for(n=0;n<=4;n++)
{int j,x;
j=a[m][0];
for(x=1;x<=4;x++)
{if(a[m][x]>j)
j=a[m][x];
}
int y,q;
y=a[0][n];
for(q=1;q<=4;q++)
{
if(a[q][n]<y)
y=a[q][n];
}
if(j==y&&y==a[m][n])
{
printf("%d %d %d",m+1,n+1,a[m][n]);w=1;
                    }
}
}
if(w==0)
printf("not found");
}
int main()
{
    int a[5][5];
	int i,j,m,n,t=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++)
		{
			m=0;
			n=0;
 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])
			{
				m=8;
			}
		    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])
            {
				n=8;
			}

		    if(m==8&& n==8)
			{
				printf("%d %d %d",i+1,j+1,a[i][j]);
			   t=8;
			}
		}
	}
    
	if(t==0)
		printf("not found");

		
	return 0;
}
int main()
{
    int n[5][5],i,j,flag,a,b;
    for(i=0;i<5;i++)
    for(j=0;j<5;j++)
    scanf("%d",&n[i][j]);
    for(i=0,flag=0,b=0;i<5;i++)
    for(j=0;j<5;j++)
    {
                    for(a=0;a<5;a++)
                    if(n[a][j]<n[i][j])
                    flag=1;
                    for(a=0;a<5;a++)
                    if(n[i][a]>n[i][j])
                    flag=1;
                    if(flag==0)
                    {
                               b++;
                               if(b==1)
                               printf("%d %d %d\n",i+1,j+1,n[i][j]);
                               else
                               printf("%d %d %d\n",i+1,j+1,n[i][j]);
                    }
                    flag=0;
    }
    if(b==0)
    printf("not found");
    return 0;
}
int main()
{
	int num[6][6]={0},maxLine[6]={0},minRow[6]={0},i,j;
	for(i=1;i<=5;i++)
	{
		for(j=1;j<=5;j++) cin>>num[i][j];     //?????????num??????maxLine?minRow???????????????????????????
	}


		for(i=1;i<=5;i++)
	{

		for(j=1;j<=5;j++) 
		{
			if(num[i][j]>=num[i][1] 
			&&num[i][j]>=num[i][2] && num[i][j]>=num[i][3] && num[i][j]>=num[i][4] && num[i][j]>=num[i][5])
				maxLine[i]=j;
		}
	}                                       //???????????????????maxLine??

		for(j=1;j<=5;j++)
		{
			for(i=1;i<=5;i++)
			{
				if(num[i][j]<=num[1][j] && num[i][j]<=num[2][j] && num[i][j]<=num[3][j] 
				&& num[i][j]<=num[4][j] && num[i][j]<=num[5][j])
					minRow[j]=i;
			}
		}                                   //????????minRow??

		int counter=0;                      //???counter????????
		for(i=1;i<=5;i++)
		{
			if (i==minRow[maxLine[i]] )
			{
				counter++;
				cout<<i<<" "<<maxLine[i]<<" "<<num[i][maxLine[i]]<<endl; //??????????????maxLine,minRow??????????????
			}
		}
		if(counter==0) cout<<"not found";      //???????notfound.
	return 0;
}
int main()
{
    int i,j,a[5][5],b[5][5]={0};
    int max,min,m=0;
    for(i=0;i<5;i++)
       for(j=0;j<5;j++)
          scanf("%d",&a[i][j]);
    for(i=0;i<5;i++)
    {
       m=0;
       max=a[i][0];
       for(j=1;j<5;j++)
       {
          if(a[i][j]>max)
          {
             m=j;
             max=a[i][m];
          }
       }
       b[i][m]++;
    }
    for(j=0;j<5;j++)
    {
       m=0;
       min=a[0][j];
       for(i=1;i<5;i++)
       {
          if(a[i][j]<min)
          {
             m=i;
             min=a[m][j];
          }
       }
       b[m][j]++;
    }
    m=0;
    for(i=0;i<5;i++)
       for(j=0;j<5;j++)
          if(b[i][j]==2)
          {
             printf("%d %d %d\n",i+1,j+1,a[i][j]);
             m++;
          }
    if(m==0)
       printf("not found");
}
int main()
{
    int a[5][5];
    int i, j, l;
    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 ++)
		{
          for (l = 0;l <= 4; l ++)
			  if(l != j && a[i][l] >= a[i][j] || l !=  i && a[i][j] >= a[l][j])
				  break;
              if(l <= 4 )
				  continue;
			  cout << i + 1 << " "<< j + 1 << " " << a[i][j];
              goto end;
		}
    cout << "not found";
end:
    return 0;
}
int main()
{
	int a[5][5],max[5]={0},i,j,col[5],t=1;

	for (i=0; i < 5; i++)
	{
		for (j=0; j<5; j++)
		{
			cin >> a[i][j];

			if (a[i][j] > max[i])
			{
				max[i]=a[i][j];
				col[i]=j;
			}
		}
	}
	for (i=0;i<5;i++)
	{
		for (j=0;j<5;j++)
		{
			if (a[j][col[i]]<max[i])
				break;
		}
		if (j==5)
		{
			cout << i+1 << ' ' << col[i]+1 << ' ' << max[i] << endl;
			t=0;
		}
	}
	if (t)
		cout << "not found" << endl;
	return 0;
}
int a[5][5],x[5],y[5];
int main(){
	int xx,yy,tmp;
	for(int i = 0;i < 5;i ++)
		for(int j = 0;j < 5;j ++)
			cin >> a[i][j];
	for(int i = 0;i < 5;i ++){
		tmp = a[i][0];
		x[i] = 0;
		for(int j = 1;j < 5;j ++){
			if(a[i][j] > a[i][x[i]])
				x[i] = j;
		}
	}
	for(int j = 0;j < 5;j ++){
		tmp = a[0][j];
		y[j] = 0;
		for(int i = 1;i < 5;i ++){
			if(a[i][j] < a[y[j]][j])
				y[j] = i;
		}
	}
	for(int i = 0;i < 5;i ++){
		if(i == y[x[i]]){
			printf("%d %d %d\n",i+1,x[i]+1,a[i][x[i]]);
			return 0;
		}
	}
	printf("not found\n");
	return 0;
}
main()
{
	int a[5][5],b[5][5],e[5][5];
	int c[5],d[5];
	int i,j,k,f,n=0,s=0;
	for(i=0;i<5;i++)
		for(j=0;j<5;j++)
	{
		scanf("%d",&a[i][j]);
		b[i][j]=a[i][j];
		e[i][j]=a[i][j];
		}
	
	for(k=0;k<5;k++)
	{
	for(j=0;j<4;j++)
	{
      if(b[k][j]>=b[k][j+1])
	  {
			f=b[k][j];b[k][j]=b[k][j+1];b[k][j+1]=f;
			}		
		}
		c[k]=b[k][4];
		}
		
	for(k=0;k<5;k++)
	{
	for(j=0;j<4;j++)
	{
      if(e[j][k]<=e[j+1][k])
	  {
			f=e[j][k];e[j][k]=e[j+1][k];e[j+1][k]=f;
			}		
		}
		d[k]=e[4][k];
		}
	
	for(i=0;i<5;i++)
	for(j=0;j<5;j++)
	{
		if(a[i][j]==c[i]&&a[i][j]==d[j])
		{
			printf("%d %d %d",i+1,j+1,a[i][j]);
		    n=n+1;	
				}
			}
	if(n==0)
	printf("not found");
	}
int main()
{
	int a[5][5],i,j,k,n=0,max,min,row,colum;
	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];
			row=i;
			colum=0;
			for(j=1;j<5;j++)
			if(a[i][j]>max)
				{
					max=a[i][j];
					colum=j;
			}
				min=max;
				for(k=0;k<5;k++)
					if(a[k][colum]<min)
						min=a[k][colum];
				if(max==min)
					{
						n++;
						cout << row+1 << " " << colum+1 << " " << max <<endl;
					}
		}
		if(n==0)
			cout << "not found" << endl;
		return 0;
}
int main()
{
	int a[5][5] = {0};
	int i, j;
	for (i = 0; i <= 4; i++)
		cin >> a[0][i];
	cin.get();
	for (i = 0; i <= 4; i++)
		cin >> a[1][i];
	cin.get();
	for (i = 0; i <= 4; i++)
		cin >> a[2][i];
	cin.get();
	for (i = 0; i <= 4; i++)
		cin >> a[3][i];
	cin.get();
	for (i = 0; i <= 4; i++)
		cin >> a[4][i];
	int max = 0, b = 0, right = 1, flag = 0;
	for (i = 0; i <= 4; i++)
	{
		max = 0;
		right = 1;
		for (j = 1; j <= 4; j++)
		{
			if (a[i][j] > a[i][max])
				max = j;
		}
		for (b = 0; b <= 4; b++)
		{
			if (a[b][max] < a[i][max])
			{
				right = 0;
				break;
			}
		}
		if (right == 1)
		{
			cout << i + 1 << " " << max + 1<< " " << a[i][max] << endl;
			flag = 1;
		}
	}
	if (flag == 0)
		cout << "not found" << endl;
	return 0;
}
int main()
{
	int a[5][5];
	int (*p)[5];
	p=a;
	int max[5][1];
	int min[5][1];
	int *pmax[5]={max[0],max[1],max[2],max[3],max[4]};
	int *pmin[5]={min[0],min[1],min[2],min[3],min[4]};
	int i,j;
	for(i=0;i<5;i++)
		for(j=0;j<5;j++)
			cin >> *(*(p+i)+j);
	for(i=0;i<5;i++)
	{
		*pmax[i]=*(*(p+i)+0);
		*pmin[i]=*(*(p+0)+i);
		for(j=0;j<5;j++)
		{
			if(*pmax[i]<*(*(p+i)+j))
				*pmax[i]=*(*(p+i)+j);
			if(*pmin[i]>*(*(p+j)+i))
				*pmin[i]=*(*(p+j)+i);
		}
	}
	int flag=0;
	for(i=0;i<5;i++)
		{
			for(j=0;j<5;j++)
		    {
			if(*pmax[i]==*pmin[j]&&*pmax[i]==*(*(p+i)+j))
			{
				cout << i+1 << " " << j+1 << " " << *(*(p+i)+j) << endl;
			    flag=1;
				break;
			}
			
		    }
			if(flag==1)
				break;
	}
	if(flag==0)
		cout << "not found" << endl;
	return 0;
}