semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main() {
	
	int num[5][5], max[2][5], min[2][5];
	for(int i=0; i<5; i++) {
		for(int j=0; j<5; j++) {
			scanf("%d", &num[i][j]);
		}
	}
	for(int i=0; i<5; i++) {
		for(int j=0; j<5; j++) {
			max[0][i] = num[i][0];
			max[1][i] = 0;
			min[0][j] = num[0][j];
			min[1][i] = 0;
		}
	}

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

	int count = 0;
	for(int i=0; i<5; i++) {
		if(min[1][max[1][i]] == i) {
			if(count != 0) printf("\n");
			printf("%d %d %d", i+1, max[1][i]+1, max[0][i]);
			count ++;
		}
	}

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

}
//**************************************
//?????????
//??????
//?????2011.10.29 19:58
//**************************************
int main()
{
    int number[5][5];//?????
    int i,j;
    for(i=0;i<5;i++)
    {
                    for(j=0;j<5;j++)
                    {cin>>number[i][j];}
    }
    int maxnumber,l;
    int max1[5][5]={0},max2[5][5]={0};//max1?max2??????????
    for(i=0;i<5;i++)//???????????
    {
                    maxnumber=number[i][0];
                    max1[i][0]=1;
                    l=0;
                    for(j=1;j<5;j++)
                    {
                                    if(maxnumber<number[i][j])
                                    {maxnumber=number[i][j];
                                    max1[i][j]=1;
                                    max1[i][l]=0;
                                    l=j;
                                    }
                    }
    }
    for(i=0;i<5;i++)//??????????
    {
                    maxnumber=number[0][i];
                    max2[0][i]=1;
                    l=0;
                    for(j=1;j<5;j++)
                    {
                                    if(maxnumber>number[j][i])
                                    {maxnumber=number[j][i];
                                    max2[j][i]=1;
                                    max2[l][i]=0;
                                    l=j;
                                    }
                    }
    }
    int judge=0;//judge??????????
    for(i=0;i<5;i++)//????????
    {
                    for(j=0;j<5;j++)
                    {
                                    if(max1[i][j]&&max2[i][j])
                                    {cout<<i+1<<" "<<j+1<<" "<<number[i][j];
                                    judge=1;
                                    }
                    }
    }
    if(judge==0){cout<<"not found";}
    return 0;
}
/*
 * 123.cpp
 *
 *  Created on: 2011-11-4
 *      Author: 11096
 */
int main()
{
	int i,j,k=0;
	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(j=0;j<5;j++) //??????
			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]; k++; }
	if(k==0) cout<<"not found"; //????????Notfound
	return 0;

}
/*
 * ??.cpp
 * ??:???
 * ????: 2011-11-4
 * ??:???????
 */

int main(){
int a[5][5];  //????
int i,j,t,s;
s=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++){
t=a[i][j];
    if((t>=a[i][0])&&(t>=a[i][1])&&(t>=a[i][2])&&(t>=a[i][3])&&(t>=a[i][4])&&(t<=a[0][j])&&(t<=a[1][j])&&(t<=a[2][j])&&(t<=a[3][j])&&(t<=a[4][j])){
     cout<<i+1<<" "<<j+1<<" "<<t<<endl;  //????
     s++;
     break;}}
if(s==0)
cout<<"not found"<<endl;
    return 0;  //????
}
int main ()
{
	int a[5][5];
	int flag[5] = {1,1,1,1,1};
	for (int i = 0; i < 5; i++)
		for (int j = 0; j < 5; j++)
			cin >> a[i][j];
		int andian = 0;
		int lie = 0;
		for (int p = 0; p < 5; p++)
		{
			andian = a[p][0];
			lie = 0;
			for (int q = 0; q < 5; q++)
			{
				if (andian < a[p][q])
				{
					andian = a[p][q];
					lie = q;
				}
			}
			for (int t = 0; t < 5; t++)
			{
				if (a[t][lie] < andian)
				{
					flag[p] = 0;
					break;
				}
			}
			if (flag[p] == 1)
				cout << p + 1 << " " << lie + 1 << " "  << andian << endl;
		}
		if (flag[0] == 0 && flag[1] == 0 && flag[2] == 0 && flag[3] == 0 && flag[4] == 0)
			cout << "not found" << endl;
		return 0;
}
int max(int array[5][5],int n)
{
	int t=array[n][0],i;
	for(i=0;i<5;i++)
	{
		if(t<array[n][i])
		t=array[n][i];
		else;
	}
	return t;
}
int min(int array[5][5],int n)
{
	int t=array[0][n],i;
	for(i=0;i<5;i++)
	{
		if(t>array[i][n])
		t=array[i][n];
		else;
	}
	return t;
}
int main()
{
	int max(int array[5][5],int x);
	int min(int array[5][5],int x);
	int a[5][5],i,j,t,count=0,andian;
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		{
			scanf("%d",&a[i][j]);
		}
		printf("\n");
	}
	for(t=0;t<5;t++)
	{
		andian=max(a,t);
		for(i=0;i<5;i++)
		{
			if(andian==min(a,i))
			{
				printf("%d %d %d\n",t+1,i+1,andian);
				break;
			}
			else
			count++;
		}
	}
	if(count==25)
	printf("not found\n");
	
	return 0;
}
int main()
{
	int i=0,k=0,j=0,max=0,min=1000000,a[6][6]={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)
			{
				max=a[i][j];
			}
		}
		a[i][5]=max;
		max=0;
	}

	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		{
			
			if(a[j][i]<min)
			{
				min=a[j][i];
			}
			
		}
		a[5][i]=min;
		min=1000000;
	}
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		{
			if(a[i][j]==a[i][5]&&a[i][j]==a[5][j])
			{	
				k=1;
				cout<<i+1<<" "<<j+1<<" "<<a[i][j]<<endl;
		    }
		}
	}
	if(k==0) cout<<"not found"<<endl;

	return 0;
}
int main()
{
	int a[5][5],i,j,max=0,min=0,pa[5],pi[5],s=0;//max???????? min????????  pa??????? pi??????
	for(i=0;i<5;i++)
	{
		max=0;
		for(j=0;j<5;j++)
		{
			cin>>a[i][j];//????
			if(a[i][j]>=max)//????????????????
			{
				max=a[i][j];
				pa[i]=j;
			}
		}
	}
		
		for (j=0;j<5;j++)//????????????????
		{
			min=a[0][j];
			for(i=0;i<5;i++)
			{
				if (a[i][j]<=min)
				{
					min=a[i][j];
					pi[j]=i;
				}
			}
		}
		for(i=0;i<5;i++)
			for(j=0;j<5;j++)
			{
				if (j==pa[i]&&i==pi[j])//????????????
				{
					cout<<i+1<<" "<<j+1<<" ";//??????????
				    cout<<a[i][j]<<endl;
					s=1;
				}
			}
			if (s==0)
			{
				cout<<"not found"<<endl;//????????
			}
			return 0;
}
int main()
{
	int a[5][5], i, j, m, k, max = 0, min, 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 = 0; 
		for (j = 0; j < 5; j++)
		{
			if (a[i][j] > max)
			{
				max = a[i][j];
				m = i;
				k = j;
			}
		}
		min = a[0][k];
		for (int l = 0; l < 5; l++)
		{
			if (a[l][k] < min)
				min = a[l][k];
		}
		if (min == max)
		{
			cout << m + 1 << " " << k + 1 << " " << a[m][k] << endl;
			flag = 1;
		}
	}
	if (flag == 0)
		cout << "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]);
		}
	}
    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])
			{
				printf("%d %d %d",i+1,j+1,a[i][j]);
				return 0;
			}
			else if(i==4&&j==4){printf("not found");}
		}
	
		

	}


return 0;
}
int main()
{   int max(int q_1,int q_2,int q_3,int q_4,int q_5);
    int min(int p_1,int p_2,int p_3,int p_4,int p_5);
    int a[5][5];
    int i,j,m,n;
    i=0;j=0;
    scanf("%d %d %d %d %d\n",&a[0][0],&a[0][1],&a[0][2],&a[0][3],&a[0][4]);
    scanf("%d %d %d %d %d\n",&a[1][0],&a[1][1],&a[1][2],&a[1][3],&a[1][4]);
    scanf("%d %d %d %d %d\n",&a[2][0],&a[2][1],&a[2][2],&a[2][3],&a[2][4]);
    scanf("%d %d %d %d %d\n",&a[3][0],&a[3][1],&a[3][2],&a[3][3],&a[3][4]);
    scanf("%d %d %d %d %d\n",&a[4][0],&a[4][1],&a[4][2],&a[4][3],&a[4][4]);
    while(i<=4)
    {    m=max(a[i][0],a[i][1],a[i][2],a[i][3],a[i][4]);
         while(j<=4)
         {    n=min(a[0][j],a[1][j],a[2][j],a[3][j],a[4][j]);
             if(a[i][j]==m&&a[i][j]==n)
             {printf("%d %d %d",i+1,j+1,a[i][j]);i=10;j=10;}
             j++;} 
         j=0;i++;}
         if(i==5)
         printf("not found");
    return 0;
}
      int max(int q_1,int q_2,int q_3,int q_4,int q_5)
      {  int da,k;
          if (q_1<q_2)
          {k=q_1;q_1=q_2;q_2=k;}
          if (q_1<q_3)
         {k=q_1;q_1=q_3;q_3=k;}
          if (q_1<q_4)
        {k=q_1;q_1=q_4;q_4=k;}
          if (q_1<q_5)
        {k=q_1;q_1=q_5;q_5=k;}
        da=q_1;
        return(da);
        }
      int min(int p_1,int p_2,int p_3,int p_4,int p_5)  
      {    int xiao,t;
          if (p_1>p_2)
          {t=p_1;p_1=p_2;p_2=t;}
          if (p_1>p_3)
         {t=p_1;p_1=p_3;p_3=t;}
          if (p_1>p_4)
        {t=p_1;p_1=p_4;p_4=t;}
          if (p_1>p_5)
        {t=p_1;p_1=p_5;p_5=t;}
        xiao=p_1;
        return(xiao);}
int main()
{
	int num[5][5],i,k,j,x,y,max=0,count=0,z=0;
	
	for(i=0;i<5;i++)
	{
		for(k=0;k<5;k++) cin>>num[i][k];
	}

	for(i=0;i<5;i++)
	{
		max=0;x=0;y=0;
		count=0;
		for(k=0;k<5;k++)
		{
			if (num[i][k]>max) {max=num[i][k];x=i;y=k;}
		}
		
		for(j=0;j<5;j++)
		{
			if (max<num[j][y]) count++;
		}
	
		if(count==4) {cout<<x+1<<" "<<y+1<<" "<<num[x][y]<<endl;z++;}
		if(z==0&&i==4) cout<<"not found"<<endl;
	}
	return 0;
}
//?????
//??? 1200017623
//????????????????????????????????????????



int main(){
	int n[5][5],i,j,k,column,num,flag = 1;
	for(i = 0; i < 5;i++){
		for(j = 0;j < 5;j++){
			cin>>n[i][j];
		}
	}

	for(i = 0;i < 5;i++){
		column = 0;
		num = n[i][0];

		for(j = 0;j < 5;j++){           //????????
			if(n[i][j] > num){
				num = n[i][j];
				column = j;
			}
		}

		flag = 1;

		for(k = 0;k < 5;k++){           //???????????
			if(n[k][column] < num){
				flag = 0;
				break;
			}
		}

		if(flag){
			cout<<i + 1<<' '<<column + 1<<' '<<num<<endl;
			break;                      //?????????
		}                  
	}
	if(flag == 0)cout<<"not found"<<endl;
	return 0;
}
int main()
{
	int a[5][5],max[5],min[5],i,j,sum=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++)
		{
		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];
		}
	}
	for(j=0;j<5;j++)
	{
		for(i=0;i<5;i++)
		{
			if(a[i][j]<=min[j])
			{
				min[j]=a[i][j];
			}
		}
	}
		for(i=0;i<5;i++)
			for(j=0;j<5;j++)
			if(max[i]==min[j]&&max[i]==a[i][j])
			{
				printf("%d %d %d",i+1,j+1,max[i]);
				sum++;			
			}
		if(sum==0)
			printf("not found");
		return 0;
}
int main()
{
	int a[5][5] = {0};
	int i, j, k;
	int found = 0;
	for (i = 0; i < 5; i ++)
		for (j = 0; j < 5; j ++)
			cin >> a[i][j];
	for (i = 0; i < 5; i ++)
	{
		int max = 0, min = 1e6,  mi, mj;
		for (j = 0; j < 5; j ++)
			if (max < a[i][j])
			{max = a[i][j]; mj = j;}
		for (k = 0; k < 5; k ++)
			if (min > a[k][mj])
			{min = a[k][mj]; mi = k;}
		if (mi == i)
		{
			found = 1;
			cout << mi + 1 << " " << mj + 1 << " " << a[mi][mj];
		}
	}
	if (!found)  cout << "not found";
	cout << endl;
	return 0;
	
}
//*********************************************************************************
//????
/*?????? (5*5)??????????????????????? 
?????????????????????????????????not found? 
??????????????????????????????????? */
//*********************************************************************************
int max(int a,int b,int c,int d,int e)//?????????
{
   int p;
   if(a>b)
	   p=a;
   else
	   p=b;
   if(p<c)
	   p=c;
   if(p<d)
	   p=d;
   if(p<e)
	   p=e;
   return p;
}
int min(int a,int b,int c,int d,int e)//?????????
{
   int p;
   if(a<b)
	   p=a;
   else
	   p=b;
   if(p>c)
	   p=c;
   if(p>d)
	   p=d;
   if(p>e)
	   p=e;
   return p;
}
int main()
{
   int a[5][5],i,j;
   for(i=0;i<5;i++)
	   for(j=0;j<5;j++)
		   cin>>a[i][j];//??5*5??
   int k=0; 
   for(i=0;i<5;i++)
	   for(j=0;j<5;j++)
	   {
	      if(max(a[i][0],a[i][1],a[i][2],a[i][3],a[i][4])==min(a[0][j],a[1][j],a[2][j],a[3][j],a[4][j]))//????
		  {
			 
             k++; 
             int m,n;
			 m=i+1;
			 n=j+1;//?????????1
			 cout<<m<<' '<<n<<' '<<max(a[i][0],a[i][1],a[i][2],a[i][3],a[i][4]);
			 break; 
		  }
	   }
	   if(k==0)
            cout<<"not found"; 
	 	   return 0;
	   
}
main()
{
int a[6][6];
int i,j,x,y,max,k,s=0;
for(i=1;i<6;i++)
for(j=1;j<6;j++)
scanf("%d",&a[i][j]);
for(i=1;i<6;i++)
{
    max=1;
for(j=1;j<6;j++)
{
if(a[i][j]>a[i][max])
max=j;
}
for(k=1;k<6;k++)
if(a[k][max]<a[i][max])
break;
if(k==6)
{
printf("%d %d %d\n",i,max,a[i][max]);
s++;
}
}
if(s==0)
printf("not found");
getchar();
getchar();
}
int main(){
    int i,j,m,n,k;
    int a[5][5];
    for(i=0;i<5;i++){
       for(j=0;j<5;j++){ 
          scanf("%d",&a[i][j]);
      }
    }
  for(i=0;i<5;i++){
    for(j=0;j<5;j++){
      for(k=0;k<5;k++){
       if(a[i][k]>a[i][j]){
        break;
       }
      }
     if(k<5){
      continue;
     }
   for(k=0;k<5;k++){
     if(a[k][j]<a[i][j]){
       break;
     }
    }
   if(k<5){
    continue;
   }
   printf("%d %d %d\n",i+1,j+1,a[i][j]);
   return 0;
   }
  }
   printf("not found");
   return 0;
}
int main()
{
	int a[5][5],i,j;
	int k,m,n,l,p=0,flag=0;
	for(i=0;i<=4;i++)
	{
		for(j=0;j<=4;j++)
		{
			scanf("%d",&a[i][j]);
		}
	}
	for(i=0;i<=4;i++)
	{
		k=a[i][0];m=i;n=0;
		for(j=1;j<=4;j++)//in a row
		{
			if(a[i][j]>k)
			{
				k=a[i][j];
				m=i;n=j;
			}
			
		}
		for(l=0;l<=4;l++)//in the column.
		{
			if(a[l][n]<a[m][n])
			{
				p++;
				break;
			}
		}
		if(p==0)
		{
			printf("%d %d %d\n",m+1,n+1,k);
		    flag++;
		}
		p=0;
	}
	if(flag==0)printf("not found\n");
	return 0;
}
/*
 * find the dot.cpp
 *
 *  Created on: 2013-11-7
 *      Author: kongwei
 */
/*???????????????????????????????????*/
int main()
{
	int array[5][5];
	for(int i=0;i<=4;i++)            //??????????
		for(int j=0;j<=4;j++)
			cin>>array[i][j];
	int g=0,k=0;                       //?????g?????0
	int lie=0;                     //??lie?????,?????????
	int hang=0;                    //??hang??????????????
	for(int i=0;i<=4;i++)
	{
		int max=0;                 //??max???????
		for(int j=0;j<=4;j++)           //for???????????
		{
			if(array[i][j]>max)//???????max
			{
				max=array[i][j];
				lie=j;                  //???????
			}
		}
		if((array[0][lie]>=max)&&
				(array[1][lie]>=max)&&
				(array[2][lie]>=max)&&
				(array[3][lie]>=max)&&
				(array[4][lie]>=max)){//?????????????
			for(k=0;k<=4;k++)             //??????????????????hang
				if(array[k][lie]==max)
					hang=k;
			cout<<hang+1<<" "<<lie+1<<" "<<array[hang][lie];//?????????????
			g=1;                        //????1
		}
	}
	if(g==0)//??????0????????????not found
		cout<<"not found";
	return 0;
}
int main()
{
	int a[5][5], i, j, maxr[5], row[5], column[5], max, c, 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];
		column[i] = 0;
		for(j = 0; j < 5; j++)
		{
			if(a[i][j] > max)
			{
				max = a[i][j];
				column[i] = j;
			}
		}
		maxr[i] = max;
		row[i] = i;
	}
	for(i = 0; i < 5; i++)
	{
		c = 0;
		for(j = 0; j < 5; j++)
		{
			if(maxr[i] > a[j][column[i]])
			{
				c = 1;
				break;
			}
		}
		if( c == 0)
		{
			cout << row[i] + 1 << " " << column[i] + 1 << " " << maxr[i] << endl;
			count++;
		}
	}
	if(count == 0)
		cout << "not found" << endl;
	return 0;
}
int main()
{
	int i,j,n[6][6],t,num=0;
	for(i=0;i<6;i++)
		for(j=0;j<6;j++)
			n[i][j]=0;//???
	for(i=0;i<5;i++)
		for(j=0;j<5;j++)
			cin>>n[i][j];//??
	for(i=0;i<5;i++)
	{
		t=n[i][0];
		for(j=0;j<5;j++)
		{
			if(n[i][j]>t)
			{
				n[i][5]=j;
				t=n[i][j];
			}
		}
	}
	for(j=0;j<5;j++)
	{
		t=n[0][j];
		for(i=0;i<5;i++)
		{
			if(n[i][j]<t)
			{
				n[5][j]=i;
			    t=n[i][j];
			}
		}
	}//n[5][j],n[i][5]???????????????????
	for(i=0;i<5;i++)
	{
		if(n[5][n[i][5]]==i)
		{
			if(num!=0)
			{
				cout<<' '<<i+1<<' '<<n[i][5]+1<<' '<<n[i][n[i][5]]<<endl;
				num++;
			}
			else
			{
				cout<<i+1<<' '<<n[i][5]+1<<' '<<n[i][n[i][5]]<<endl;
				num++;
			}
		}
	}
	if(num==0)
		cout<<"not found";
	return 0;
}
int main()
{
	int c[M][N];
	int max[M],min[N];
	int a,b,m,n;
	for(a=0;a<M;a++){
		for(b=0;b<N;b++){
			scanf("%d",&(c[a][b]));
		}
	}
	for(m=0;m<M;m++){
		max[m]=c[m][0];
	}
	for(n=0;n<N;n++){
		min[n]=c[0][n];
	}
	int i,j;
	for(i=0;i<M;i++){
		for(j=0;j<N;j++){
			if(max[i]<c[i][j]){
				max[i]=c[i][j];
			}
			if(min[j]>c[i][j]){
				min[j]=c[i][j];
			}
		}
	}
	int p,q,k=0;
	for(p=0;p<M;p++){
		for(q=0;q<N;q++){
			if(max[p]==min[q]){
				printf("%d %d %d",p+1,q+1,max[p]);
				k++;
			}
		}
	}
	if(k==0){
		printf("not found\n");
	}
	return 0;
}
int main() 
{int a[100][100];
int i,j;
for(i=1;i<=5;i++)
  for(j=1;j<=5;j++)
  {
  cin>>a[i][j];
  }
  int k,t,m=0;
  int c=1,b=1;
 for(i=1;i<=5;i++)
 {
  for(j=1;j<=5;j++)
  {
      
       {for(t=1;t<=5;t++)
       if(a[i][t]>a[i][j])
          c=0;
       }
      for(k=1;k<=5;k++)
	  {if(a[k][j]<a[i][j])
	      b=0;
      } 
      if((c*b)!=0)
      {
      cout<<i<<" "<<j<<" "<<a[i][j]<<endl;
      m=1;}
        c=1;b=1;
  } 
 }
 if(m==0)
 cout<<"not found";

 return 0;
}
int a[7][7], x, y;
int main()
{
    int i = 0, j, k, l;
    for (j = 1; j <= 5; ++ j)
        for (k = 1; k <= 5; ++ k)
            cin >> a[j][k];
    for (j = 1; j <= 5; ++ j)//?????????
        for (k = 1; k <= 5; ++ k)
        {
            for (l = 1; l <= 5; ++ l)//????????
                if (a[j][l] > a[j][k])
                    break;
            if (l <= 5)
                continue;
            for (l = 1; l <= 5; ++ l)//????????
                if (a[l][k] < a[j][k])
                    break;
            if (l > 5)//????????
            {
                i = 1;
                cout << j << " " << k << " " << a[j][k] << endl;
            }
        }
    if (!i)
        cout << "not found" << endl;
    return 0;
}
/*
 * SaddlePoint.cpp
 *
 *  Created on: 2012-11-6
 *      Author: Cui Zhaoxiong Class4 1200012931
 */
int main() {
	int a[5][5];//??5*5??a
	for (int i = 0; i < 5; i++) {//?????a
		for (int j = 0; j < 5; j++) {
			cin >> a[i][j];
		}
	}
	int ex[2][5];//??2*5??ex?????????????????????????????????????
	memset(ex,0,sizeof(ex));//?ex??
	for (int i = 0; i < 5; i++) {//??ex????
		for (int j = 0; j < 5; j++) {
			if (a[i][j] > a[i][ex[0][i]])
				ex[0][i] = j;
		}
	}
	for (int i = 0; i < 5; i++) {//???ex????
		for (int j = 0; j < 5; j++) {
			if (a[j][i] < a[ex[1][i]][i])
				ex[1][i] = j;
		}
	}
	/*
	 * ????
	for (int i=0;i<5;i++) cout << ex[0][i]<<' ';
	cout <<endl;
	for (int i=0;i<5;i++) cout << ex[1][i]<<' ';
	*/
	int i=0;//i?????
	for (;i<5;i++){
		if (ex[1][ex[0][i]]==i) {//???i????????????????i??????(i,ex[0][i])????
			cout <<i+1 <<' ' <<ex[0][i]+1 <<' ' <<a[i][ex[0][i]] <<endl;//??
			break;
		}
	}
	if (i==5) cout <<"not found";//?????????????not found
	return 0;
}
main()
{
      int a[5][5];
      int i,j,k,s,t,e,f,y,m;
      for (i=0;i<=4;i++)
      {
          for(j=0;j<=4;j++)
          {
              scanf("%d",&a[i][j]);
          }
      }
      y=0;
      for (k=0;k<5;k++)
      {
          e=a[k][0];
          f=0;
          for (s=1;s<5;s++)
          {
              if(e<=a[k][s])
              {
                  e=a[k][s];
                  f=s;
              }
          }
          m=0;
          for(t=0;t<5;t++)
          {
              if (a[k][f]>a[t][f])
              {
                  m=1;
                  break;
              }
          }
          if (m==0)
          {
              printf ("%d %d %d\n",k+1,f+1,a[k][f]);
              y=1;
              break;
          }
      }
      if (y==0)
      printf ("not found\n");
}
int main()
{
    int flag = 0;          
    int g;               
    int a[5][5];          
    int i , j;            
    int temp;              
    int row[5];           
    int column;            
    
    for (i = 0; i < 5; i++)
    {
        for (j = 0; j < 5; j++)
        {
            cin >> a[i][j];
        }
    }
    
    for (i = 0; i < 5; i++)
    {
        column = 0;
        temp = a[i][0];
        for (j = 1; j < 5; j++) 
        {
            if (a[i][j] > temp)
            {
                column = j;                
                temp = a[i][j];
            }
        }
        row[i] = column;                  
    }
     
    for (i = 0; i < 5; i++)
    {
        g = 0;
        for (j = 0; j < 5; j++)
        {
            if (a[j][row[i]] < a[i][row[i]])          
            {
                g++;
            }
        }
        if (g == 0)                                    
        {
            cout << i + 1 << " " << row[i] + 1 << " " << a[i][row[i]] << endl;
            flag ++ ;                                    
        }
    }
    if (flag == 0)                                       
    {
        cout << "not found" <<endl;
    }
    return 0;
}
int main()
{
	int a[5][5];
	int i,j,m,max,col,f=0,c;
	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];
		col=0;
		for(j=1;j<5;j++)
		{
			if(a[i][j]>max)
			{
				max=a[i][j];
				col=j;
			}
		}
		for(m=0;m<5;m++)
		{
			c=0;
			if(m!=i)
			{
				if(max>=a[m][col])
				{
					c=1;
					break;
				}
			}
		}
		if(c==0)
		{
			printf("%d %d %d\n",i+1,col+1,max);
			f=1;
		}
	}
	if(f==0)
		printf("not found\n");
	return 0;
}
// * * * * * * * * * * * * * * *
// *???????             *
// *??????  1300013011   *
// *???2013.11.4            *
// * * * * * * * * * * * * * * *
int main()
{
	// a????h0?l0?????????j??????????
	int a[5][5], max = 0, l0 = 0, h0, j = 0;
	
	for (int i = 0; i <= 4; i++)        // ????????
	{
		for (int k = 0; k <= 4; k++)
			cin >> a[i][k];
	}
	
	for (int h = 0; h <= 4; h++)       // ??????????
	{
		max = a[h][0];                 // ?????????????????
		h0 = h;
		l0 = 0;
		for (int l = 1; l <= 4; l++)
		{
			if (a[h][l] < max)
				continue;
			max = a[h][l];
			l0 = l;                    // h0?l0?????????
		}

		// ?????????????????????j?1
		if ((a[0][l0] >= max) + (a[1][l0] >= max) + (a[2][l0] >= max) +
			(a[3][l0] >= max) + (a[4][l0] >= max) == 5)
		{
			cout << h0 + 1 << " " << l0 + 1 << " " << max << endl;
			j++;
		}
	}

	if (j == 0)    // ????????????not found
		cout << "not found" << endl;
	return 0;
}
int main()
{
	int a[5][5],i,j,count=1,p,max;
	for(i=0;i<5;i++)
		for(j=0;j<5;j++)
			scanf("%d",&a[i][j]);
	for(i=0;i<5;i++)
	{ 
		max=0;
		for(j=1;j<5;j++)
		{
			if(a[i][j]>a[i][max])
				max=j;
		}
		for(p=0;p<5;p++)
		{
			if(p==i)
				continue;
			if(a[i][max]>a[p][max])
				break;
		}
		if(p==5)
		{
			printf("%d %d %d\n",i+1,max+1,a[i][max]);
			count++;
		}
	}
	if(count==1)
		printf("not found\n");
	return 0;
}
int main()
{
	int a[6][6], i, j, m, n, max;
	for (i = 1;i <= 5; i++)
		for(j = 1; j <= 5;j++)
			cin >> 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];
					m = i;
					n = j;
				}
			for (j = 1;j <= 5; j++)
					if(a[j][n] < max)  break;
			if (j == 6)   
				{
					cout << m << " " << n << " " << a[m][n] << endl;
					break;
				}
	}
		if ( i == 6) cout << "not found" << endl;
		return 0;
}
int main()
{
	int i,j,line=0,row=0,imax[6]={0},jmin[6]={2146796,2146796,2146796,2146796,2146796,2146796},a[6][6]={0};
	for(i=1;i<6;i++)
		for(j=1;j<6;j++)
			cin>>a[i][j];
	for(i=1;i<6;i++)
		for(j=1;j<6;j++)
		{
			if(a[i][j]>imax[i])
				imax[i]=a[i][j];
			if(a[i][j]<jmin[j])
				jmin[j]=a[i][j];
		}
	for(i=1;i<6;i++)
	{
		for(j=1;j<6;j++)
		{
			if(imax[i]==jmin[j])
			{
				line=i;
				row=j;
			}
		}
	}
	if(imax[line]==jmin[row]&&line!=0&&row!=0)
		cout<<line<<" "<<row<<" "<<imax[line];
	else
		cout<<"not found";
	return 0;
}
int main ()
{
	int a[5][5],i,j,js=0,m=0,k;
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		{
			scanf("%d",&a[i][j]);
		}
	}
	for(i=0;i<=4;i++)
	{
		for(j=0;j<=4;j++)
		{
			js=0;
			for(k=0;k<=4;k++)
			{
				if(a[i][j]>=a[i][k])
				{
					js++;
				}
			}
			if(js==5)
			{
				js=0;
				for(k=0;k<=4;k++)
				{
					if(a[i][j]<=a[k][j])
					{
						js++;
					}
				}
				if(js==5)
				{
					printf("%d %d %d",i+1,j+1,a[i][j]);
					m=1;
				}
			}
		}
	}
	if(m==0)
		printf("not found");

	return 0;
}