semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
/**
* @file 1.cpp
* @author ???
* @date 2011-10-26
* @description
* ??????:????
*/
int main()
{
	int a[6][6], i, j, k, l, hang, lie;
	int ct = 0, ctl, ad;
	for (i = 1; i <= 5; i++)
	{
		for (j = 1; j <= 5; j++)
			cin >> a[i][j];
	}
	for (hang = 1; hang <= 5; hang++)
	{
		ad = a[hang][1];
		l = 1;
		ctl = 0;
		for (lie = 1; lie <= 5; lie++)
		{
			if (a[hang][lie] > ad)
			{
				ad = a[hang][lie];
				l = lie;
			}
		}
		for (k = 1; k <= 5; k++)
		{
			if (ad < a[k][l])
				ctl++;
		}
		if (ctl == 4)
		{
			cout << hang << ' ' << l << ' ' <<a[hang][l];
			ct++;
		}
	}
	if (ct == 0)
		cout << "not found";
	return 0;
}
int main()
{
	int a[5][5],i,j,k,x[5],y[5],big[5],small[5];
	for(i=0;i<=4;i++)
		for(j=0;j<=4;j++)
			cin>>a[i][j];
	for(i=0;i<=4;i++)
	{
		x[i]=0;big[i]=a[i][0];
		for(j=0;j<=4;j++)
		 if(a[i][j]>big[i])
			{
				big[i]=a[i][j];
				x[i]=j;
			}
	}
	for(j=0;j<=4;j++)
	{
		y[j]=0;small[j]=a[0][j];
		for(i=0;i<=4;i++)
		 if(a[i][j]<small[j])
			{
				small[j]=a[i][j];
				y[j]=i;
			}
	}
	int flag=0;
	for(i=0;i<=4;i++)
	{
		if(y[x[i]]==i)
			{
				flag=1;
				cout<<i+1<<' '<<x[i]+1<<' '<<a[i][x[i]]<<endl;
		}
	}
	if(flag==0)
		cout<<"not found";
	return 0;
}
/*
 * 4.cpp
 *
 *  Created on: 2011-11-4
 *      Author: 11294
 */
int main(){
	//??????
	int a[5][5];
	int b[5][5];
	int c[5][5];
	int i,j,w;
	//????
	for(i=0;i<5;i++){
		for(j=0;j<5;j++){
			cin>>a[i][j];
			b[i][j]=a[i][j];
			c[i][j]=a[i][j];
		}
	}
	//?b?c????????????????????
	for(i=0;i<5;i++){//??b[i][4]?????
		for(j=0;j<=3;j++){
			if(b[i][j]>b[i][j+1]){
				w=b[i][j];b[i][j]=b[i][j+1];b[i][j+1]=w;
			}
		}
	}
	for(j=0;j<5;j++){//??c[4][j]?????
		for(i=0;i<=3;i++){
			if(c[i][j]<c[i+1][j]){
				w=c[i][j];c[i][j]=c[i+1][j];c[i+1][j]=w;
			}
		}
	}
	//????,???????,????
	int p=0,x;
	for(i=0;i<5;i++){
		for(j=0;j<5;j++){
			if(a[i][j]==b[i][4]&&a[i][j]==c[4][j]){cout<<i+1<<" "<<j+1<<" "<<a[i][j];x=a[i][j];p++;break;}
		}
	}
	//??????,???????
	if(p==0)cout<<"not found"<<endl;
	return 0;
}//?????
int main()
{
	int a[5][5],max[5],y[5];
	int e=0;
	int is=1;
	for(int i=0;i<5;i++)
	{
		max[i]=0;
		for(int j=0;j<5;j++)
		{
			cin>>a[i][j];
			if(max[i]<=a[i][j]){max[i]=a[i][j];y[i]=j;}
		}
	}
	for(int i=0;i<5;i++)
	{
		for(int j=0;j<5;j++)
		{
			if(max[i]>a[j][y[i]])is=0;
		}
		if(is)
		{
			e=1;
			cout<<i+1<<' '<<y[i]+1<<' '<<max[i];
		}
		is=1;
	}
	if(e==0) cout<<"not found";
    return 0;
}
int main()
{
	int a[5][5]={0};
	int b[5][5]={0};
	int i=0,j=0,s=0;
	for(i=0;i<5;i++)
		for(j=0;j<5;j++)
			cin>>a[i][j];
	for(i=0;i<5;i++)
	{
		int x=0,y=0,t=0,d=0;
		for(j=0;j<5;j=j+1)
		{
			if(t<=a[i][j])
			{
				t=a[i][j];
		         x=i;
				 y=j;
			}
			else
				x=i;
		}
		//cout<<t<<endl;
		int k=0;
		for(k=0;k<5;k++)
		{
			if(t>a[k][y])
			d=d+1;
		}		
		 if(d==0)
		 {
		 cout<<x+1<<" "<<y+1<<" "<<t<<endl;
		 s=s+1;
		 }
	}
	if(s==0)
		cout<<"not found"<<endl;
	return 0;
}
//***************************
//**???4.cpp
//**??????
//**???2013.11.1
//**?????????
//***************************
int main()
{
	int a[6][6];
	int n = 0, c1, c2;

	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++)
		{
			c1 = 0;
			c2 = 0;
			for (int k = 1; k <= 5; k++)
			{
				if (a[i][j] >= a[i][k])
					c1++;
				if (a[i][j] <= a[k][j])
					c2++;
			}
			if (c1 + c2 == 10 && c1 * c2 == 25)
			{
				cout << i << " " << j << " " << a[i][j];
				n++;
			}				
		}
	if (!n)
		cout << "not found" << endl;
	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 c[100]={0};
	int m;
	int t=0;
	for(i=0;i<5;i++)
	{
		m=0;
		for(j=0;j<5;j++)
		{
			if(a[i][j]>a[i][m])m=j;
		}
		c[10*i+m]++;
	}
	for(j=0;j<5;j++)
	{
		m=0;
		for(i=0;i<5;i++)
		{
			if(a[i][j]<a[m][j])m=i;
		}
		c[10*m+j]++;
	}
	for(i=0;i<100;i++)
	{
		if(c[i]>1){printf("%d %d %d\n",i/10+1,i%10+1,a[i/10][i%10]);t=1;}
	}
	if(t==0)printf("not found\n");
	return 0;

}
int main()
{
	int a[5][5],b=0;
	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)
	{   int max1=a[i][0],y1=0,x1=-1;
		for(int j=1;j<5;++j)
			if(a[i][j]>max1)
			{
				max1=a[i][j];
				y1=j;
			}
		for(int j=0;j<5;++j)
		{if(a[j][y1]<a[i][y1])
		{x1=i;break;
		}
			}
		if(x1==-1)
		{cout<<i+1<<" "<<y1+1<<" "<<a[i][y1];b=1;
		}
	}
	if(b==0)
		cout<<"not found";
	return 0;
}
int main(){
	int i,j,m,n,p=1;
	int a[5][5];
	for(i=0;i<5;i++)
		for(j=0;j<5;j++)
			cin>>a[i][j];
	for(i=0;i<5;i++){
		for(m=0,j=1;j<5;j++)
			if(a[i][m]<a[i][j])m=j;
		for(n=0,j=1;j<5;j++)
			if(a[n][m]>a[j][m])n=j;
		if(n==i){cout<<n+1<<' '<<m+1<<' '<<a[n][m];
		p=0;}}
		if(p==1)cout<<"not found"<<endl;
	return 0;
}
void main()
{
	int alei[5][5];
	int i,j,k,m,n,p,sign;
	p=0;  sign=0;
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		{
			scanf("%d",&alei[i][j]);
	    }
	}
	for(i=0;i<5;i++)
	{   
		n=alei[i][4];m=4;
		for(j=0;j<4;j++)
		{    
             if(n<alei[i][j])
			 {
				 m=j;n=alei[i][j];
			 }
		}
		for(k=0;k<5;k++)
		{
			if(n>alei[k][m]) {sign=1;break;}
		}
		if(sign==1)  {sign=0;continue;}
		printf("%d %d %d\n",i+1,m+1,n); p+=1;
	}
    if(p==0) printf("not found\n");

}
int main()
{
	int max=0,sign,a[5][5],i,j;
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		{
			cin>>a[i][j];
		}
	}
	for(j=0;j<5;j++)
	{
		if(a[0][j]>max)
		{
			max=a[0][j];
			sign=j;
		}
	}
	for(i=0;i<5;i++)
	{
		if(a[i][sign]<max)
			break;
		if(i==4&&a[i][sign]>max)
		{
			cout<<"1"<<" "<<sign+1<<" "<<a[0][sign];
			return 0;
		}
	}
	max=0;
	for(j=0;j<5;j++)
	{
		if(a[1][j]>max)
		{
			max=a[1][j];
			sign=j;
		}
	}
	for(i=0;i<5;i++)
	{
		if(a[i][sign]<max)
			break;
		if(i==4&&a[i][sign]>max)
		{
			cout<<"2"<<" "<<sign+1<<" "<<a[1][sign];
			return 0;
		}
	}
	max=0;
	for(j=0;j<5;j++)
	{
		if(a[2][j]>max)
		{
			max=a[2][j];
			sign=j;
		}
	}
	for(i=0;i<5;i++)
	{
		if(a[i][sign]<max)
			break;
		if(i==4&&a[i][sign]>max)
		{
			cout<<"3"<<" "<<sign+1<<" "<<a[2][sign];
			return 0;
		}
	}
	max=0;
	for(j=0;j<5;j++)
	{
		if(a[3][j]>max)
		{
			max=a[3][j];
			sign=j;
		}
	}
	for(i=0;i<5;i++)
	{
		if(a[i][sign]<max)
			break;
		if(i==4&&a[i][sign]>max)
		{
			cout<<"4"<<" "<<sign+1<<" "<<a[3][sign];
			return 0;
		}
	}
	max=0;
	for(j=0;j<5;j++)
	{
		if(a[4][j]>max)
		{
			max=a[4][j];
			sign=j;
		}
	}
	for(i=0;i<5;i++)
	{
		if(a[i][sign]<max)
			break;
		if(i==4&&a[i][sign]>max)
		{
			cout<<"5"<<" "<<sign+1<<" "<<a[4][sign];
			return 0;
		}
	}
	cout<<"not found";
	return 0;
}
int main()
{
  int a[5][5];
  int i,j;
  int status,col,row,judge;
  int cmp;
  col=row=status=cmp=judge=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]>cmp)
		 {
			 cmp=a[i][j];
			 col=i;
			 row=j;
		 }
		 if(j==4)
		 {
			 status=1;
		 }
	  }
		 int p;
		 for(p=0;p<5;p++)
		 {
			 if(a[p][row]>=cmp)
				 continue;
			 else
			 {status=0;
			 break;
			 }
		 }
		 if(status==1)
		 {
			 printf("%d %d %d",col+1,row+1,a[col][row]);
			 status=0;
			 judge=1;
			
		 }
		  cmp=0;
  }
	 if(judge==0)
	 printf("not found");
	 return 0;
  }
int max(int m1,int m2,int m3,int m4,int m5)
{
    if(m1>m2)
        m2=m1;     
    if(m2>m3)
        m3=m2; 
    if(m3>m4)
        m4=m3; 
    if(m4>m5)
        m5=m4; 
    return m5;
}
int min(int n1,int n2,int n3,int n4,int n5)
{
    if(n1<n2)
        n2=n1;     
    if(n2<n3)
        n3=n2; 
    if(n3<n4)
        n4=n3; 
    if(n4<n5)
        n5=n4; 
    return n5;
}
int main()
{
    int a[5][5];
    for(int i=0;i<5;i++)
    {
        for(int j=0;j<5;j++)
        {
            scanf("%d",&a[i][j]);    
        }    
    }
    int min1[5],max2[5];
    for(int i=0;i<5;i++)
    {
        min1[i]=min(a[0][i],a[1][i],a[2][i],a[3][i],a[4][i]);  
    }
    for(int i=0;i<5;i++)
    {
        max2[i]=max(a[i][0],a[i][1],a[i][2],a[i][3],a[i][4]);    
    }
    int count=0;
    for(int i=0;i<5;i++)
    {
        for(int j=0;j<5;j++)
        {
            if(a[i][j]==min1[j]&&a[i][j]==max2[i])
            {
                printf("%d %d %d\n",i+1,j+1,a[i][j]);
                count=1;
            }    
        }    
    }
    if(count==0)
        printf("not found");
    return 0;
}
int main()
{
	int n,i,j,k,m;
	int a[5][5];
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
			scanf("%d",&a[i][j]);
	}
	for(i=0,n=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		{
			for(k=0,m=0;k<5;k++)
			{
				if(a[i][j]<a[i][k]||a[i][j]>a[k][j])
				{m=1;break;}
			}
			if(m==0)
			{
				n++;
				printf("%d %d %d\n",i+1,j+1,a[i][j]);
			}
		}
	}
	if(n==0)
		printf("not found");
	return 0;
}
main()
{
      int a[5][5],b[7];
      int i,j,k,x,m,y=0;
      for (i=0;i<=4;i++)
      {
          for (j=0;j<=4;j++)
          {
              scanf ("%d",&a[i][j]);
          }
      }
      for (i=0;i<=4;i++)
      {
          x=a[i][0],m=0;
          for (j=0;j<=4;j++)
          {
              if (x<a[i][j])
              { x=a[i][j]; m=j;}
          }
          for (b[i]=0,k=0;k<=4;k++)
          {
              if (a[i][m]>a[k][m])
              break;
              else b[i]=b[i]+1;
          }
          if (b[i]==5)
          { y=y+1; printf ("%d %d %d\n",i+1,m+1,a[i][m]); }
      }
      if (y==0) printf ("not found\n");
}
int main()
{
	int num[5][5];
	int i,j;
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		{
			scanf("%d",&num[i][j]);
		}
	}
	int judge1[5][5];
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		{
			judge1[i][j]=0;
		}
	}
	int judge2[5][5];
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		{
			judge2[i][j]=0;
		}
	}
	for(i=0;i<5;i++)
	{
		int max=num[i][0];
		int i0=i,j0=0;
		for(j=0;j<5;j++)
		{
			if(num[i][j]>max)
			{
				i0=i;
				j0=j;
				max=num[i][j];
			}
		}
		judge1[i0][j0]=1;
	}
	for(j=0;j<5;j++)
	{
		int min=num[0][j];
		int i0=0,j0=j;
		for(i=0;i<5;i++)
		{
			if(num[i][j]<min)
			{
				i0=i;
				j0=j;
				min=num[i][j];
			}
		}
		judge2[i0][j0]=1;
	}
	int g=0;
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		{
			if(judge1[i][j]==1&&judge2[i][j]==1)
			{
				printf("%d %d %d\n",i+1,j+1,num[i][j]);
				g=1;
			}
		}
	}
	if(g==0)printf("not found\n");
	return 0;
}
int main()
{
	int i,j,a[5][5],t[5],m[5],tag=0;
	for(i=0;i<5;i++)
	for(j=0;j<5;j++)
	scanf("%d",&a[i][j]);
	for(i=0;i<5;i++)
	t[i]=a[i][0];
	for(j=0;j<5;j++)
	m[j]=a[0][j];
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		{
			if(t[i]<a[i][j])t[i]=a[i][j];
			if(m[i]>a[j][i])m[i]=a[j][i];
		}
	}
	for(i=0;i<5;i++)
	for(j=0;j<5;j++)
	{
		if(a[i][j]==t[i]&&a[i][j]==m[j])
		{
			printf("%d %d %d\n",i+1,j+1,a[i][j]);
			tag++;
		}
	}
	if(tag==0)
	printf("not found\n");
	return 0;
}
int main()
{
    int i,j,k,t,p,sz[5][5];
    p=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(k=0;k<5;k++){
                t=1;
                if(k!=j&&sz[i][j]<sz[i][k]||k!=i&&sz[k][j]<sz[i][j]){
                   t=0;
                   break;
                }
             }
             if(t==1){
                   printf("%d %d %d",i+1,j+1,sz[i][j]); 
                   p=1;
             }
        }
    }
    if(p==1){
      return 0;
    }else{
      printf("not found");
    }
    return 0;
}
int main()
{
	int a[6][6],x,y,max[6] = {0},maxx[6],maxy[6],yy,i;
	for (y = 1;y <= 5;y++)
	{
		for (x = 1;x <= 5;x++)
			cin>>a[x][y];
	}
	for (y = 1;y <= 5;y++)
	{
		for (x = 1;x <= 5;x++)
		{
			if (a[x][y] > max[y])
			{
				max[y] = a[x][y];
				maxx[y] = x;
				maxy[y] = y;
			}
		}
	}
	for (y = 1;y <= 5;y++)
	{
		for (yy = 1;yy <= 5;yy++)
		{
			if (max[y] > a[maxx[y]][yy])
			{
				max[y] = 0;
				break;
			}
		}
	}
	i = 1;
	for (y = 1;y <= 5;y++)
	{
		if (max[y] != 0)
		{
			cout<<maxy[y]<<" "<<maxx[y]<<" "<<max[y];
			i = 0;
		}
	}
	if (i == 1)
		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;
}
int max(int array[][5],int n,int i)
{
	int j,m;
	m=array[i][0];
	for(j=0;j<n;j++)
	m=m>array[i][j]?m:array[i][j];
	return m;
}
int min(int array[][5],int n,int j)
{
	int i,m;
	m=array[0][j];
	for(i=0;i<n;i++)
	m=m<array[i][j]?m:array[i][j];
	return m;
}	
	
int main()
{
	int a[5][5];
	int i,j,k=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]==max(a,5,i)&&a[i][j]==min(a,5,j))
			{
				cout<<i+1<<" "<<j+1<<" "<<a[i][j]<<endl;
				k++;
			}
		}
	}
	if(k==0)
	cout<<"not found";
	return 0;
}
main()
{	
	int a[5][5];
	for (int i=0;i<=4;i++)
	for(int j=0;j<=4;j++)
		scanf("%d",&a[i][j]);
	int min[5];
	for (int k=0;k<=4;k++){
		int temp=a[0][k];
		for (int m=1;m <=4;m++){
			if(a[m][k]<temp)
			temp=a[m][k];
		} 
		min[k]=temp;
	} 
	int b,c,l=0;
	for ( b=0;b<=4;b++){
		int max=a[b][0];
		for (c=1;c<=4;c++){
			if(a[b][c]>max)
			max=a[b][c];
		}
	for(c=0;c<=4;c++)
	{
		if(a[b][c]==max&&a[b][c]==min[c])
		{
		printf("%d %d %d",b+1,c+1,a[b][c]);
		l++;
		}
	}
	}
	if(l==0)
	printf("not found");
}
int main()
{
	int a[5][5];
	int i,j,p,q,max,m,n,h,l;
	for(i=0;i<=4;i++)
	{
		scanf("%d %d %d %d %d",&a[i][0],&a[i][1],&a[i][2],&a[i][3],&a[i][4]);
	}
	n=0;
	for(p=0;p<=4;p++)
	{
		max=a[p][0];
		for(j=1;j<=4;j++)
		{
			if(max<=a[p][j])
			max=a[p][j];
		}
		for(j=0;j<=4;j++)
		{
			if(a[p][j]==max)
			break;
		}
		m=0;
		for(q=0;q<=4;q++)
		{
			if(a[p][j]<=a[q][j])
			m++;
		}
		if(m==5)
		{
			h=p+1;
			l=j+1;
			printf("%d %d %d\n",h,l,a[p][j]);
			n++;
		}
	}
	if(n==0)
	printf("not found\n");
	return 0;
}
int main()
{
	int b,i,c,d,n,e,j,k,m,a[10][10];
	m=1;
	e=1;
	for(i=1;i<=5;i++){
		for(k=1;k<=5;k++){
		scanf("%d",&a[i][k]);
		}
	}
	i=1;
	for(i=1;i<=5;i++){
		k=1;
		for(k=1;k<=5;k++){
			j=1;
			m=1;	
			for(j=1;j<=5;j++){
					if(a[i][k]<a[i][j])m=0;		
				}
				if(m==1){
					j=1;
					for(j=1;j<=5;j++){
						if(a[i][k]>a[j][k])m=0;
					}
					if(m==1){
						printf("%d %d %d\n",i,k,a[i][k]);
					e=0;}
				}
		}
	}
	if(e==1)printf("not found");

	return 0;
}
int main()
{
	int a[5][5];
	int i,j,m,k,counter=0,s,n;
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		{
			scanf("%d",&a[i][j]);
		}
	}
	for(n=0;n<5;n++)
	{
		m=a[n][0];k=0;
		for(j=1;j<5;j++)
		{

			if(a[n][j]>m)	
             {
	             m=a[n][j]; 
				 k=j;
             }       
			
		}
		s=a[0][k];
		for(i=1;i<5;i++)
		{
			if(a[i][k]<s)
			{
				s=a[i][k];
			}
		}
		if(s==m)
		{
			printf("%d %d %d\n",n+1,k+1,m);
			counter++;
		}
	}
	if(counter==0)
	{
		printf("not found\n");
	}
	return 0;
}
int main()
{
	int a[5][5]={0},i,j,maxi,maxj,g,max,k=0;
	for (i=0;i<5;i++)
		for(j=0;j<5;j++)
			cin >> a[i][j];
	for (i=0;i<5;i++)
	{
		g=1;
		max=a[i][0];
		maxi=i;
		maxj=0;

		for(j=0;j<5;j++)
		{
			if(max<a[i][j])
			{
				max=a[i][j];
				maxi=i;
				maxj=j;
			}
		}
		for(j=0;j<5;j++)
		{
			if (a[maxi][maxj] > a[j][maxj])
		{
			g=0;
			break;
		}
		}
		if (g!=0)
		{
			cout << maxi+1 << " "<< maxj+1 << " " << a[maxi][maxj] <<endl;
			k=1;
		}
	}
	if (k==0)
		cout << "not found" << endl;
	return 0;
}
int main()
{
 int an,hang,lie,i,r,a[5][5],paohuierhao=0;
 for(i=0;i<5;i++)
 {
  for(r=0;r<5;r++)
  scanf("%d",&a[i][r]);
 }
 for(i=0;i<5;i++)
 {
  int paohui=0;
  an=a[i][0];
  hang=i+1;
  lie=1;
  for(r=0;r<5;r++)
  {
   if(an<a[i][r])
   {
    an=a[i][r];
    lie=r+1;
   }
  }
  for(r=0;r<5;r++)
  {
   if(an>a[r][lie-1])
   {
    paohui++;
    break;
   }
  }
  if(paohui==0)
  {
   printf("%d %d %d",hang,lie,an);
   paohuierhao++;
  }
 }
if(paohuierhao==0)
printf("not found");
return 0;
}
int main()
{
  int a[5][5];
  int b[5];
  int c[5];
  int i,j,t;
  t=0;
  for(i=0;i<5;i++)
  {
   for(j=0;j<5;j++)
   { 
     cin >> a[i][j];
   }
  }
  for(i=0;i<5;i++)
  {
    b[i]=a[i][0];
  }
  for(j=0;j<5;j++)
  {
    c[j]=a[0][j];
  }
  for(i=0;i<5;i++)
  {
    for(j=0;j<5;j++)
    {
      if(a[i][j]>b[i])
      {
       b[i]=a[i][j];
      }
      if(a[i][j]<c[j])
      {
        c[j]=a[i][j];
      }
    }
  }
  for(i=0;i<5;i++)
  {
    for(j=0;j<5;j++)
    {
      if(b[i]==c[j])
      {
        cout << i+1 << " " << j+1 << " ";
        cout << b[i] << endl;
        t++;
      }
    }
  }
  if(t==0)
  {
   cout << "not found" << endl;
  }
  cin.get();cin.get();cin.get();
  return 0;
}
int main(){
	int number[5][5],i,p,judge[5][5],name,min,max;
	for(i=0;i<5;i++){for(p=0;p<5;p++){scanf("%d",&number[i][p]);judge[i][p]=0;}}
	for(i=0;i<5;i++){max=number[i][0];name=0;for(p=0;p<5;p++){if(number[i][p]>max){name=p;max=number[i][p];}}   judge[i][name]++;}
	for(p=0;p<5;p++){min=number[0][p];name=0;for(i=0;i<5;i++){if(number[i][p]<min){name=i;min=number[i][p];}}   judge[name][p]++;}
	for(i=0;i<5;i++){for(p=0;p<5;p++){if(judge[i][p]==2){printf("%d %d %d",i+1,p+1,number[i][p]);return 0;}}}
	printf("not found");

	

    return 0;}
main()
{
      int a[5][5];
      int i,j,z,m,x,y;
      int count=0,b;
      for (i=0;i<5;i++)
      {
          for (j=0;j<5;j++)
          {
              scanf("%d",&a[i][j]);
          }
      }
      int s;
      for (i=0;i<5;i++)
      {
          for(j=0;j<5;j++)
          {
               s=a[i][0];
               for(z=0;z<5;z++)
               { 
                   if(z==j)
                   {
                           continue;
                   }
                   else
                   {
                       if (a[i][z]>s)
                       {
                                     s=a[i][z];
                       }
                   }
               }
               if (a[i][j]>=s)
               {
                              s=a[0][j];
                              for(m=0;m<5;m++)
                              {
                                       if(m==i)
                                       {
                                               continue;
                                       }
                                       else
                                       {
                                           if (a[m][j]<s)
                                           {
                                                         s=a[m][j];
                                           }
                                       }
                              }
                              if (a[i][j]<=s)
                              {
                                          x=i+1;
                                          y=j+1;
                                          count++;
                                          b=a[i][j];
                              }  
               }
          }
      }
      if(count==0)
      {
                  printf("not found");
      }
      else
      {
          printf("%d %d %d",x,y,b);
      }
      getchar();getchar();getchar();getchar();getchar();
}
int main()
{
	int a[5][5];
	int i,j;
	int column[5];
	int max,exist,flag;
	exist = 0;
	flag = 0;
    for (i = 0; i <= 4; i++)
		for (j = 0; j <= 4; j++)
		{
			cin >> a[i][j];
		}
	for (i = 0; i <= 4; i++)
	{
		max = a[i][1];
		column[i] = 1;
		for (j = 0; j <= 4; j++)
		{
			if (a[i][j] > max)
			{
				max = a[i][j];
				column[i] = j;
			}
		}
	}
	for (i = 0; i <= 4; i++)
	{
		for (j = 0; j <= 4; j++)
		{
			if (a[i][column[i]] > a[j][column[i]])
			{
				exist = 0;
				break;
			}
			else
				exist = 1;
		}
		if (exist == 1)
		{
			cout << i+1 << " " << column[i]+1 << " " << a[i][column[i]] << endl;
			flag = 1;
		}
	}
	if (flag == 0)
		cout << "not found" << endl;
return 0;
}
int main()
{
    int i, j, k = 0;
    int a[5][5];
    int max[5];
    int min[5];
    for (i = 0; i <= 4; i++)
        for (j = 0; j <= 4; j++)
            cin >> a[i][j];
    for (i = 0; i < 5; i++)
    {
        max[i] = a[i][0];
        min[i] = a[0][i];
    }
    for (i = 0; i <= 4; i++)
        for (j = 0; j <= 4; 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 <= 4; i++)
        for (j = 0; j <= 4; j++)
            if (max[i] == min[j])
            {
                cout << i + 1 << " " << j + 1 << " " << max[i];
                k++;
            }
    if (k == 0)
        cout << "not found";
    return 0;
}
int main()
{
	//freopen("in.txt","r",stdin);
	//freopen("out.txt","w",stdout);
	int i, j, k, column=-1;
	int arr[5][5];
	for (i = 0; i < 5; ++ i) for (j = 0; j < 5; ++ j) cin >> arr[i][j];
	for (i = 0; i < 5; ++ i)
	{
		for (j = 0; j < 5; ++ j)
		{
			for (k = j+1; k < 5; ++ k)
				if (arr[i][j] < arr[i][k]) break;
			if (k == 5)
			{
				column = j;
				break;
			}
		}
		for (j = 0; j < 5; ++ j)
			if (arr[i][column] > arr[j][column]) break;
		if (j == 5)
		{
			cout << i+1 << " " << column+1 << " " << arr[i][column] << endl;
			break;
		}
	}
	if (i == 5) cout << "not found\n";
}
int main()
{
	int i,j,t,p,a[6][6],max;
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		{
			scanf("%d",&a[i][j]);
		}
	}
	for(i=0;i<5;i++)
	{
		p=0;
		max=a[i][0];
		t=0;
		for(j=1;j<5;j++)
		{
			if(a[i][j]>max)
			{
				max=a[i][j];
				t=j;
			}
		}
        for(j=0;j<5;j++)
		{
			if(max<=a[j][t])
			{
				p++;
			}
		}
		if(p==5)
		{
			printf("%d %d %d",i+1,t+1,max);
			printf("\n");
			break;
		}
	}
	if(i>=5)
		printf("not found");
	return 0;
}
int main()
{
    int a[5][5];
    int b[5];
    int c[5];
    int i,j;
    int f = 0;
    for(i=0; i<5; i++)
    {
 		 for(j=0; j<5; j++)
 		 {
		      cin>>a[i][j];
		      if(i == 0)
		      {
			   	   b[j] = a[i][j];
	          }
	          if(j == 0)
	          {
			   	   c[i] = a[i][j];
	          }
	          if(a[i][j] < b[j])
	          {
	   			  b[j] = a[i][j];
			  }
			  if(a[i][j] > c[i])
			  {
			      c[i] = a[i][j];
			  }  			 
         }
    }
    for(i=0; i<5; i++)
    {
 		 for(j=0; j<5; j++)
 		 {
		      if(b[j] == c[i])
		      {
	   		       cout<<i+1<<" "<<j+1<<" "<<b[j]<<endl;
	   		       f = 1;
	   		  }
		 }
    }
    if(f == 0)
    {
	 	 cout<<"not found"<<endl;
    }
    return 0;
}
int main()//??? 
{
	int a[5][5];//??????????? 
	int b[5][5];//???????????????????? 
	int c[5][5];//????????????????????
	int i,j,m=0,k;
		for (i=0;i<5;i++)
		for (j=0;j<5;j++)
		b[i][j]=0;
			for (i=0;i<5;i++)
		for (j=0;j<5;j++)
		c[i][j]=0;    
	for (i=0;i<5;i++)
		for (j=0;j<5;j++)
			cin>>a[i][j];//????    
	for (j=0;j<5;j++)
		for (i=0;i<5;i++)
			for (k=0;k<5;k++)
			{
				if (a[i][j]>a[k][j])
					break;
				if  (a[i][j]<=a[k][j]&&k==4)
					b[i][j]=a[i][j];//?????????? 
			}
			for (i=0;i<5;i++)
				for (j=0;j<5;j++)
					for (k=0;k<5;k++)
					{
						if (a[i][j]<a[i][k])
							break;
						if  (a[i][j]>=a[i][k]&&k==4)
							c[i][j]=a[i][j];//?????????? 
					}
					for (i=0;i<5;i++)
						for (j=0;j<5;j++)
						{ 
							if (b[i][j]==c[i][j]&&b[i][j]!=0)
							 {
                                cout<<i+1<<" "<<j+1<<" "<<b[i][j]<<endl;//???????????????? ???? 
									m++;
                   
							}
						}
				if (/*b[i][j]!=c[i][j]&&i==4&&j==4&&*/m==0)
				cout<<"not found"<<endl;//else??not found 

						return 0;
}
main()
{
    int a[5][5];
    int i,j;
    int x,y;
    int count=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]>=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]&&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\n",x,y,a[i][j]);count++;}
        }
        if(count==0)
        printf("not found");
}