semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	int a[6][6], b[6];
	int i, j, k, m = 0, n, t;
	for (i = 1; i < 6; i++)
	{
		for(j = 1; j < 6; j++)
		{
			cin >> a[i][j];
		}
	}
	for (k = 1; k < 6; k++)
	{
		b[k] = a[k][1];
	}
	for (i = 1; i < 6; i++)
	{
		t = 0;
		for (j = 1; j < 6 ; j++)
		{
			if (b[i] <= a[i][j])
			{
				b[i] = a[i][j];
				n = j;
			}
		}
		for (k = 1; k < 6; k++)
		{
			if (b[i] > a[k][n])
			{
				t = 1;
			}
		}
		if (t == 0)
		{
			cout << i << " " << n << " " << b[i];
			m = 1;
		}
	}
	if (m == 0)
	{
		cout << "not found" << endl;
	}
	return 0;
}
int main()
{
   int a[5][5],i,j,k,s,h;
   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(k=0;k<5;k++)
           {
               if(a[i][j]<a[i][k])
               break;
           }
           if(k==5)
           {
               for(s=0;s<5;s++)
               {
                   if(a[i][j]>a[s][j])
                   break;
               }
               if(s==5)
               {printf("%d %d %d",i+1,j+1,a[i][j]);h=1;}
           }
       }
   }
   if(h!=1)
   printf("not found");
   getchar();
   getchar();
    return 0;
}
int main()
{
	int i,j,st,err;
	int a[5][5];
	int max[5];
	int p[5];
	err=1;
	for(i=0;i<5;i++)
		for(j=0;j<5;j++)
			scanf("%d",&a[i][j]);
	for(i=0;i<5;i++)
	{
		max[i]=a[i][0];
		p[i]=0;
		for(j=1;j<5;j++)
		{
			if(max[i]<a[i][j])
			{
				max[i]=a[i][j];
				p[i]=j;
			}
		}
	}
	for(i=0;i<5;i++)
	{
		st=0;
		for(j=0;j<5;j++)
			if(j!=i)
			{
				if(max[i]>a[j][p[i]])
					st=1;
			}
			if(st==0)
			{
				printf("%d %d %d",i+1,p[i]+1,max[i]);
				err=0;
			}
	}
	if(err==1)
		printf("not found");




	return 0;
}
///********************************
//*?????(11-5) ????   **
//*?????? 1300012745 **
//*???2013.11.2  **
//********************************
int main()
{
	int a[5][5], b[5]={5}, c[5]={5},  //a[5][5]??????b[5],c[5]??????????????????????,?b[5]?c[5]???i?????????
		i, j, max, min, jm = 0, im = 0, k=0;       //i,j??????max,min???????????????
	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][0];     //??????????????
		for (j = 0; j <= 4; j++)
		{
			if (a[i][j] >= max)     //???????????????????????????jm?????????
			{
				max = a[i][j];
				jm = j;
			}
		}
		b[i]=jm;       //b[i]????????????????????jm?
	}
	for (j = 0; j <= 4; j++)
	{
		min = a[0][j];     //?????????????????
		for (i = 0; i <= 4; i++)  
		{
			if (a[i][j] <= min)         //???????????????????????????jm?????????
			{
				min = a[i][j];
				im = i;
			}
		}
		c[j]=im;          //c[j]????????????????????im?
	}
	for (i = 0; i <= 4; i++)
	{
		if (c[b[i]]==i)      //?????????????????????????????????c[b[i]]==i
		{
			cout << i+1 << " " << b[i]+1 << " " << a[i][b[i]];   //????0????????????1?????+1
			k++;
		}
	}
	if (k == 0)    //??k??0????????????
		cout << "not found";
	return 0;
}
int main(){
int sz[5][5];
int zd[5];
int zx[5];
int s,p=0,a,b;
for(a=0;a<5;a++){
	for(b=0;b<5;b++){
		scanf("%d",&sz[a][b]);
	}
}
	for(a=0;a<5;a++){
		s=0;
	for(b=0;b<5;b++){
	
	if(sz[a][b]>=s) {
     s=sz[a][b];
	zd[a]=s;
	
	}
	
	}
	}
	for(b=0;b<5;b++){
		s=100000;
	for(a=0;a<5;a++){
if(sz[a][b]<=s) 
{s=sz[a][b];
	zx[b]=s;
}
	}
	}

for(a=0;a<5;a++){
	for(b=0;b<5;b++){
		if(sz[a][b]==zd[a]&&sz[a][b]==zx[b]){
			printf("%d %d %d",a+1,b+1,sz[a][b]);
		p++;
	}
}
}
	if(p==0)
		printf("not found");

 return 0;
}
int main()
{
    int a[10][10],i,j,cnt = 0;
    for (i = 1;i <= 5;i++)
        for (j = 1;j <= 5;j++)
        {
            cin >> a[i][j];
        }
    for (i = 1;i <= 5;i++)
        for (j = 1;j <= 5;j++)
        {
            if (a[i][j] <= a[1][j] && a[i][j] <= a[2][j] && a[i][j] <= a[3][j] && a[i][j] <= a[4][j] && a[i][j] <= a[5][j]
                && 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[i][5])
            {
                cout << i << " " << j << " " << a[i][j] << endl;
                cnt++;
            }
        }
    if (cnt == 0)
    cout << "not found" << endl;
       return 0;
}
int main()
{
	int sz[5][5],x,y,i,j,a=0;
	for(x=0;x<5;x++) for(y=0;y<5;y++) scanf("%d",&sz[x][y]);
	for(x=0;x<5;x++) for(y=0;y<5;y++)
	{
		for(j=0;j<5;j++) if(sz[x][y]<sz[x][j]) break;
		if(j==5) for(i=0;i<5;i++) if(sz[x][y]>sz[i][y]) break;
		if(i==5)
		{
			a=1;
			printf("%d %d %d\n",x+1,y+1,sz[x][y]);
			i=0;
			j=0;
		}
	}
	if(a==0) printf("not found");
	return 0;
}
main()
{
	int *a[5];
	int *b;
	b=(int *)malloc(5*sizeof(int));
	int i,j,k,l=0,m=0;
	for(i=0;i<5;i++)
	{
		a[i]=(int *)malloc(5*sizeof(int));
		*(b+i)=0;
		for(j=0;j<5;j++)
		{
			scanf("%d",*(a+i)+j);
			if(*(b+i)<*(*(a+i)+j))
				*(b+i)=*(*(a+i)+j);
		}
	}
	for(i=0;i<5;i++)
		for(j=0;j<5;j++)
			if(*(b+i)==*(*(a+i)+j))
			{
				for(k=0;k<5;k++)
					if(*(b+i)<=*(*(a+k)+j))
						l++;
				if(l==5)
				{
					printf("%d %d %d",i+1,j+1,*(b+i));
					m++;
				}
				l=0;
			}
	if(m==0)
		printf("not found");
}
int main()
{
	int a[5][5], i, j, I, J, t = 0 ;
	for (i = 0 ; i <= 4 ; i ++)
		for (j = 0 ; j <= 4 ; j ++)
			cin >> a[i][j] ;
	for (i = 0 ; i <= 4 ; i ++)
	{
		if (t != 0)
			break ;
		for (j = 0 ; j <= 4 ; j ++)
			if (a[i][j] > t)
				t = a[i][j], I = i, J = j ;
		for (int k = 0 ; k <= 4 ; k ++)
			if (a[k][J] < t)
				t = 0 ;
	}
	if (t == 0)
		cout << "not found" ;
	else
		cout << I + 1 << " " << J + 1 << " " << t ;
	
	return 0 ;
}
int main()
{
    int a[5][5],i,j,m,n,b=1;
    for(i=0;i<5;i++)
       scanf("%d %d %d %d %d",&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]<a[i][0]) {b=0;continue;}
          if(a[i][j]<a[i][1]) {b=0;continue;}
          if(a[i][j]<a[i][2]) {b=0;continue;}
          if(a[i][j]<a[i][3]) {b=0;continue;}
          if(a[i][j]<a[i][4]) {b=0;continue;}
          if(a[i][j]>a[0][j]) {b=0;continue;}
          if(a[i][j]>a[1][j]) {b=0;continue;}
          if(a[i][j]>a[2][j]) {b=0;continue;}
          if(a[i][j]>a[3][j]) {b=0;continue;}
          if(a[i][j]>a[4][j]) {b=0;continue;}
          printf("%d %d %d",i+1,j+1,a[i][j]);
          b=1;
          break;
       }
       if(b==1) break;
    }     
    if(b==0)
      printf("not found");
        
    
}
int main()
{
	int a[5][5];
	int temp;
	int hang_max[5],lie_min[5];
	int flag=1;
	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++)
	{
		hang_max[i]=a[i][0];
		for(int j=0;j<5;j++)
		{
			if(a[i][j] > hang_max[i])
			{
				hang_max[i]=a[i][j];
			}
		}
	}
	for(int j=0;j<5;j++)
	{
		lie_min[j]=a[0][j];
		for(int i=0;i<5;i++)
		{
			if( a[i][j] < lie_min[j] )
			{
				lie_min[j]=a[i][j];
			}
		}
	}
	for(int i=0;i<5;i++)
		for(int j=0;j<5;j++)
		{
			if( (a[i][j] == hang_max[i]) && (a[i][j] == lie_min[j]) )
			{
				cout<<i+1<<' '<<j+1<<' '<<a[i][j]<<endl;
				
				return 0;
			}
		}	
		cout<<"not found"<<endl;
			
    
	return 0;
}
int main()
{
	int i,j;
	int a[5][5];
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		{
			scanf("%d",&a[i][j]);
		}
	}
	int x[5],y[5];
	for(i=0;i<5;i++)
	{
		int max=-10000000;
		for(j=0;j<5;j++)
		{
			if(max<a[i][j])
			{
				max=a[i][j];
				x[i]=j;
			}
		}
	}
	for(i=0;i<5;i++)
	{
		int min=10000000;
		for(j=0;j<5;j++)
		{
			if(min>a[j][i])
			{
				min=a[j][i];
				y[i]=j;
			}
		}
	}
	int bl=1;
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		{
			if(x[i]==j&&y[j]==i)
			{
				printf("%d %d %d\n",i+1,j+1,a[i][j]);
				bl=0;
			}
		}
	}
	if(bl)
		printf("not found\n");
}
int min(int a,int b,int c,int d,int e)
{
	int min;
	min=a<b?a:b;
	min=min<c?min:c;
	min=min<d?min:d;
	min=min<e?min:e;
	return(min);
}
int main()
{
    int a[5][5];
    int i,j;
    for(i=0;i<5;i++)
    	for(j=0;j<5;j++)
    		cin>>a[i][j];
    for(i=0;i<5;i++)
    {
    j=a[i][0]>a[i][1]?0:1;
    j=a[i][j]>a[i][2]?j:2;
    j=a[i][j]>a[i][3]?j:3;
    j=a[i][j]>a[i][4]?j:4;
    if(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;
    		break;}
    if(i==4)
            	cout<<"not found"<<endl;
    }
    return 0;
}
int main()
{
	int a[6][6];
	int i,j;
	for (i=1;i<6;i++)
		for (j=1;j<6;j++)
			cin>>a[i][j];//????????????
	int big=0,small=1,line,row;
	for (i=1;i<6;i++)//???????
	{
		line=i;row=1;
		big=a[i][1];
		for (j=2;j<6;j++)
		{
			if (a[i][j]>big)
				{
				big=a[i][j];
				row=j;
				}//??????????
		}
		for (j=1;j<6;j++)
		{
			if (a[j][row]<big)
				break;//????? ????????????,??????
		}
		if (j==6)
			cout<<line<<" "<<row<<" "<<big<<endl;//??????????????
		else small++;//??????????
	}
	if (small==6)  cout<<"not found"<<endl;//??????????not found
	return 0;
}
int main()
{
    int a[6][6],b[6][6]={0},c[6][6]={0};
    int i,j,p=0;
    for(i=1;i<=5;i++)
      for(j=1;j<=5;j++)
      cin>>a[i][j];
    for(int k=1;k<=5;k++) 
            for(int l=1;l<=5;l++)
                    for(int i=1;i<=5;i++)
                    {
                            if(i==l) continue;
                            if(a[k][l]<a[k][i])
                            b[k][l]=b[k][l]+1;
                    }
    for(int l=1;l<=5;l++)   
            for(int k=1;k<=5;k++)
                    for(int i=1;i<=5;i++)
                    {
                            if(i==k)continue;
                            if(a[k][l]>a[i][l])
                            c[k][l]=c[k][l]+1;
                    }
     for(int i=1;i<=5;i++)
           for(j=1;j<=5;j++) 
             
                    if(b[i][j]+c[i][j]==0)
                    {
                    cout<<i<<" "<<j<<" "<<a[i][j]<<endl;
                    p=1; }
           if(p==0)
           cout<<"not found"<<endl;
     return 0;
}
int main()
{
	int a[5][5];
    int i,j,max=0,address[5][2],exist1=0,exist2=0;
    for (i=1;i<=5;i++)
	{   max=0;
	    for (j=1;j<=5;j++)
		{
			scanf("%d",&a[i-1][j-1]);
		    if (a[i-1][j-1]>max)
			{ 
			 max=a[i-1][j-1];
			 address[i-1][0]=i-1;
			 address[i-1][1]=j-1;
			 
			}
		}
	
	}

	for (i=1;i<=5;i++)
	{ int hang,lie;
		for (j=1;j<=5;j++)
		{   
			hang=address[i-1][0];
			lie=address[i-1][1];
			if (a[j-1][lie]<a[hang][lie])
                 exist1=1;
		}
		if (exist1==0)
		{
			printf("%d %d %d",hang+1,lie+1,a[hang][lie]);
			exist2=1;
		}
		exist1=0;
	}
	if (exist2==0)
		printf("%s","not found");
	getchar();
return 0;
}
int main()
{
	
	int a[N][N];
	int i,j,k,q;
	int count1,count2,num=0;
	for (i=0;i<N;i++)
	{
		for (j=0;j<N;j++)
		{
			scanf("%d",&a[i][j]);
		}
	}
	for (i=0;i<N;i++)
	{
		for (j=0;j<N;j++)
		{
			count1=0;
			for (q=0;q<N;q++)
			{
				if (a[i][j]>=a[i][q])
				{
					count1++;
				}
			}
			if (count1==N)
			{
				count2=0;
				for (k=0;k<N;k++)
				{
					if (a[i][j]<=a[k][j])
					{
						count2++;
					}
				}
				if (count2==N)
				{
					printf("%d %d %d\n",i+1,j+1,a[i][j]);
					num++;
				}
			}
		}
	}
	if (num==0)
	{
		printf("not found\n");
	}
	return 0;
}
int check(int a[5][5],int h,int l)
{
    int i,j;
    for (i=0;i<5;i++)//???
      if (a[h][i]>a[h][l]) return 0;//?????number
    for (i=0;i<5;i++)//scan hang
      if (a[i][l]<a[h][l]) return 0;
    return 1;
}
int main()
{
   int a[5][5],que=30302,n=0,posh,posl;
   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++)
     for (j=0;j<5;j++)
       if (check(a,i,j))
         {
             que=a[i][j];
             posh=i+1;
             posl=j+1;
         }

    if (que!=30302)
      printf("%d %d %d",posh,posl,que);
    else printf("not found");
  return 0;

}
int main()
{
	int a[5][5],i,j,m,n,t,k,l,p,z=1;
	for(i=0;i<5;i++)
		for(j=0;j<5;j++)
			scanf("%d",&a[i][j]);
	for(m=0;m<5;m++)
	{
		t=a[m][0];
		p=0;
		for(n=0;n<5;n++)
		{
			if(a[m][n]>t)
			{
			t=a[m][n];
			p=n;
			}
		}
		k=1;
		for(l=0;l<5;l++)
		{
			if(a[l][p]<t)
			{
				k=0;break;
			}
		}
		if(k){
			printf("%d %d %d",m+1,p+1,a[m][p]);z=0;}
	}
	if(z)
		printf("not found");
	return 0;
}
//********************************
//*???????   **
//*?????? 1300012713 **
//*???2013.11.02  **
//********************************
int main() 
{ 
	int a[5][5], num = 0; //????a?????num
	for(int i = 1; i <= 5; i++)
	{
		for(int j = 1; j <= 5; j++)
		{
			cin >> a[i-1][j-1]; //??????
		}
	}
	for(int m = 1; m <= 5; m++) //?????
	{
		for (int n = 1; n <= 5; n++)
		{
			//???????
			if(a[m-1][n-1] >= a[m-1][0] && a[m-1][n-1] >= a[m-1][1] 
				&& a[m-1][n-1] >= a[m-1][2] && a[m-1][n-1] >= a[m-1][3] 
				&& a[m-1][n-1] >= a[m-1][4] && a[m-1][n-1] <= a[0][n-1] 
				&& a[m-1][n-1] <= a[1][n-1] && a[m-1][n-1] <= a[2][n-1] 
				&& a[m-1][n-1] <= a[3][n-1] && a[m-1][n-1] <= a[4][n-1])
			{
				cout << m << " " << n << " " << a[m-1][n-1]; //??? ????????
			    num = num + 1; //????
			}
		}
	}
	if(num == 0) cout << "not found"; //????????not found
	return 0;
}
int main()
{
	int flag = 0, c = 0, max = 0, l, h;
	int a[5][5];
	for (int i = 0; i < 5; i++)
		for (int j = 0; j < 5; j++)
		{
			cin >> a[i][j];
		}
	for (int i = 0; i <= 4; i++)
	{
		c = 0;
		l = 0;
		max = 0;
		for (int j = 0; j <= 4; j++)
		{
			if (a[i][j] > max)
			{
				max = a[i][j];
				l = j;
			}
		}
	
		for (int k = 0; k <= 4; k++)
		{
			if (max > a[k][l])
			{
				break;
			}
			c++;
		}
		if (c == 5)
		{
			cout << i + 1 << " " << l + 1 << " " << max << endl;
			flag = 1; 
		}
	}
	if (flag == 0)
	{
		cout << "not found" << endl;
	}
	return 0;
}
int main()
{
int a[5][5],max=0,row=0,line=0,judge=0;
 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++)
         {
         int j=0;
         max=a[i][j];
         line=i;
         row=j;
         for(int j=0;j<5;j++)
             {
             
             for(int k=j+1;k<5;k++)
                 {
                 if(max<a[i][k])
                    {
                    max=a[i][k];
                    line=i;
                    row=k;                
                    }    
                 }
             }
          if(max<=a[0][row]&&a[line][row]<=a[1][row]&&a[line][row]<=a[2][row]&&a[line][row]<=a[3][row]&&a[line][row]<=a[4][row])
             {
             printf("%d %d %d",line+1,row+1,max);
             judge=1;
             }
         }  
 if(judge==0)
    printf("not found");   
}
main()
{
      int a[5][5],i,j,x,y;
     int m[5]={0,0,0,0,0};
      x=1;
      y=0;
     int n[5]={0,0,0,0,0};
      for(i=0;i<5;i++)
      {
                      for(j=0;j<5;j++)
                      a[i][j]=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(n[i]<a[i][j])
                                      {
                                                   n[i]=a[i][j];
                                                   m[i]=j;
                                      }
                      }
      }
      for(i=0;i<5;i++)
      {
                      for(j=0;j<5;j++)
                      {
                               if(n[i]>a[j][m[i]])
                               {
                                                  x=0;
                                break;
                                }
                                }
      if(x==1)  
     { printf("%d %d %d\n",i+1,m[i]+1,n[i]);
      y=1;}
      x=1;
      }
      if(y==0)
      printf("not found");
                       
}
int main()
{int a[5][5];
int i,j,max,k,q,r=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];q=0;
for(j=1;j<5;j++)
{if(a[i][j]>max)
	{max=a[i][j];q=j;}}
 for(k=0;k<5;k++)
	 {if(k==i)
		 continue;
	  if(a[k][q]<=a[i][q])
		  break;
           if(a[k][q]>a[i][q])
                continue;}
  if(k==5)
  { cout<<i+1<<" "<<q+1<<" "<<a[i][q]<<endl;r++;}
}if(r==0)
	cout<<"not found"<<endl;
return 0;
	}
int main(int argc, char *argv[])
{
  int max=0,flag=0,n=0;
  int row,col;
  int a[6][6]={0};
  int i,j,k;
  
  
  for(i=1;i<=5;i++){
                    for(j=1;j<=5;j++){
                                      scanf("%d",&a[i][j]);
                                      }
                    } 



  for(i=1;i<=5;i++,max=0){
                    
                    for(j=1;j<=5;j++){
                                      if(a[i][j]>max){
                                                      max=a[i][j];
                                                      row=i;
                                                      col=j;
                                                      }
                                      }
                                      
                                      
                    for(k=1;k<=5;k++) {
                                     if(a[k][col]<max){flag=1;break;}
                                     } 
                    if(flag==0){printf("%d %d %d\n",row,col,max);n++;}
                    else{flag=0;}
                                                     
                    } 
  if(n==0){printf("not found\n");}                                
	
  return 0;
}
int main(){
	int a[5][5],max[5]={0},b[5];
	for(int i=0;i<5;i++){
		for(int j=0;j<5;j++){
			cin>>a[i][j];
			if(a[i][j]>max[i])max[i]=a[i][j];
			}//??????????????????max[i]?? 
		}
		for(int i=0;i<5;i++){
			for(int j=0;j<5;j++){
				if(a[i][j]==max[i])b[i]=j;
				}//???????????????b[i]?? 
			}
			int andian=0;//?andian?????????? 
			for(int x=0;x<5;x++){//??x????????? 
				int num=0;//??num??? 
				for(int i=0;i<5;i++){
					if( (i!=x) && (a[i][b[x]]<=max[x]) )break;
						else  num++;//?????????max[x]??num++?i==x???num++ 
					}
					if(num==5){
						andian=1; 
						cout<<x+1<<" "<<b[x]+1<<" "<<max[x];//???????????? 
						}
				}
				if(andian==0)cout<<"not found";
				
				return 0;
	}
/*
 * xiaoceyan6.cpp
 *????
 *  Created on: 2010-11-12
 *      Author: william
 */
int main() //???
{
	int a[5][5], i, j, n=0; //??????  i, j, n????a[5][5]  n???0
	for(i=0;i<5;i++)  //for?? ???
	{
		for(j=0;j<5;j++)  //for?? ???
		{
			cin>>a[i][j];  //??a[][]
		}
	}
	for(i=0;i<5;i++) //for?? ???
	{
		for(j=0;j<5;j++) //for?? ???
		{
		   if(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[i][0]&&
				   a[i][j]<=a[1][j]&&a[i][j]<=a[2][j]&&a[i][j]<=a[3][j]&&a[i][j]<=a[4][j]&&a[i][j]<=a[0][j])//?????
		   {
			  			   cout<<i+1<<" "<<j+1<<" "<<a[i][j];//??????
			   			   n++; //n??

		   }

		}
	}
	if(n==0)
		cout<<"not found";  //?????? ??not found
	return 0; //??
}  //??
int main(void)
{
	int a[N][M],i,j,k;
	for(i=0;i<N;i++)
		for(j=0;j<M;j++)
			scanf("%d",&a[i][j]);
    for(i=0;i<N;i++)
	{
		j=0;
		for(k=0;k<M;k++)
			if(a[i][k]>a[i][j])
				j=k;
		for(k=0;k<N;k++)
			if(a[k][j]<a[i][j])
				break;
		if(k==N)
		{
			printf("%d %d %d\n",i+1,j+1,a[i][j]);
			return 0;
		}
	}
	printf("not found\n");
	return 0;
}
main()
{
      int a[5][5];
      int dian1,dian2,i,j,n=0,k,l,c,d;
      for(i=0;i<5;i++)
      for(j=0;j<5;j++)
      scanf("%d",&a[i][j]);
      for(i=0;i<5;i++)
      {
                      dian1=a[i][0];
                      c=i;
                      d=0;
      for(j=0;j<5;j++)
      {
                 if(dian1<a[i][j])
                 {
                 dian1=a[i][j];
                 c=i;
                 d=j;
                 }
                 if(j==4)
                 {
                         dian2=a[0][d];
                         for(k=0;k<5;k++)
                         {
                                         if(a[k][d]<dian2)
                                         dian2=a[k][d];
                         }
                                         if(dian1==dian2)
                                         {
                                         printf("%d %d %d",c+1,d+1,a[c][d]);
                                         n++;
                                         }
                 }
      }
      }
      if(n==0)
      printf("not found");
      getchar();
      getchar();
      getchar();
      }
main()
{
int a[5][5];
int p=0;
int max,min,t,c;
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++)
{
max=a[i][0];
t=0;
for(j=1;j<5;j++)
{
if(a[i][j]>max)
{max=a[i][j];
t=j;
}
}
min=max;
for(j=0;j<5;j++)
{
if(a[j][t]<min)
{
min=a[j][t];
break;}
}
if(max==min)
{printf("%d %d %d",i+1,t+1,max);
p=1;}
}
if(p==0)
printf("not found");
}
/* Note:Your choice is C IDE */
void main()
{int a[5][5],i,r,j,temp,tempi,tempj,flag=1,flag1=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,temp=a[i][0],tempi=i,tempj=0;j<5;j++)                      //?????????
   {if (a[i][j]>temp) {temp=a[i][j];tempi=i;tempj=j;}}//???????????
   flag=1;
   for(r=0;r<5;r++)
   if (a[tempi][tempj]>a[r][tempj]) flag=0;        //??????????
   if(flag==1){printf("%d %d %d",tempi+1,tempj+1,a[tempi][tempj]);flag1=1;}//????????,?????1
   }
   if(flag1==0) printf("not found");}//????????????
int main()
{
    int a[5][5];
    int cow,col,i,j,k,t,max,min,cow1,t1,m=0;
    for(cow=0;cow<=4;cow++){
    for(col=0;col<=4;col++){
    scanf("%d",&a[cow][col]); 
    }
    }
    for(cow=0;cow<=4;cow++){
    max=a[cow][0];
    for(i=0;i<=4;i++){
    if(a[cow][i]>=max){
    max=a[cow][i];
    t=i;//a[cow][t]??????????????i???? 
    }
    } 
    k=0; 
    min=a[cow][t];
    for(j=0;j<=4;j++){ 
    if(a[j][t]<=min&&j!=cow)//??????? 
    k=1;
    } 
    if(k==0){
    cow1=cow+1;
    t1=t+1; 
    m=1 ; 
    printf("%d %d %d\n",cow1,t1,a[cow][t]);
    } 
    } 
    if(m==0)
    printf("not found");
    return 0; 
}
int max(int x1,int x2,int x3,int x4,int x5)
{
     if (x1<x2) x1=x2;
     if (x1<x3) x1=x3;
     if (x1<x4) x1=x4;
     if (x1<x5) x1=x5;
     return x1;
}
int min(int x1,int x2,int x3,int x4,int x5)
{
     if (x1>x2) x1=x2;
     if (x1>x3) x1=x3;
     if (x1>x4) x1=x4;
     if (x1>x5) x1=x5;
     return x1;
}
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 m=0;   
    for (i=0;i<5;i++)
       for (j=0;j<5;j++)
        {
          int p=max (a[i][0],a[i][1],a[i][2],a[i][3],a[i][4]),q=min (a[0][j],a[1][j],a[2][j],a[3][j],a[4][j]);
          if (p==q&&p==a[i][j])
            {  
              printf ("%d %d %d",i+1,j+1,a[i][j]);
              m=1;
            } 
        }
    if (m==0)
        printf ("not found");    
}
int main()
{
	int z[6][6];
	int a,b,c,e,f;
	f=0;
	for (a=1;a<=5;a++)
	{
		for(b=1;b<=5;b++)
		{
			scanf("%d",&z[a][b]);
		}
	}
    for (a=1;a<=5;a++)
	{
		for(b=1;b<=5;b++)
		{
			e=0;
			for(c=1;c<=5;c++)
			{
				if (z[a][b]<=z[a][c]) e+=1;
				if (z[a][b]>=z[c][b]) e+=1;
			}
			if (e==2) 
				{
					printf("%d %d %d",a,b,z[a][b]);
					f=1;
				}
		}
	}
	if (f==0) printf("not found");
	return 0;
}
int main()
{
	int col[5],row[5];
	int i,j,max,min;
	int p[5][5];
	for (i=0;i<5;i++)
		for (j=0;j<5;j++)
			cin>>*(*(p+i)+j);
	for (i=0;i<5;i++)
	{
		max=0;min=2100000000;
		for (j=0;j<5;j++)
		{
			if (max<*(*(p+i)+j))
			{
				max=*(*(p+i)+j);
				*(row+i)=j;
			}
			if (min>*(*(p+j)+i))
			{
				min=*(*(p+j)+i);
				*(col+i)=j;
			}
		}
	}
	for (i=0;i<5;i++)
		if (*(col+*(row+i))==i)
		{
			cout<<i+1<<" "<<*(row+i)+1<<" "<<*(*(p+i)+*(row+i))<<endl;
			return 0;
		}
	cout<<"not found"<<endl;
	return 0;
}
int main()
{
	int a[5][5],i,j,f=0;
	scanf("%d%d%d%d%d",&a[0][0],&a[0][1],&a[0][2],&a[0][3],&a[0][4]);
	scanf("%d%d%d%d%d",&a[1][0],&a[1][1],&a[1][2],&a[1][3],&a[1][4]);
	scanf("%d%d%d%d%d",&a[2][0],&a[2][1],&a[2][2],&a[2][3],&a[2][4]);
	scanf("%d%d%d%d%d",&a[3][0],&a[3][1],&a[3][2],&a[3][3],&a[3][4]);
	scanf("%d%d%d%d%d",&a[4][0],&a[4][1],&a[4][2],&a[4][3],&a[4][4]);
	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])
				{
					printf("%d %d %d",i+1,j+1,a[i][j]);
					f=1;
				}
			}
		}
	}
	if(f==0)
		printf("not found");
	return 0;
}