semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int a[5][5];
int judge(int x,int y)
{
  int i,j;
  for(i=0;i<5;i++)
    if(a[i][y]<a[x][y])
       return 0;
  for(j=0;j<5;j++)
    if(a[x][j]>a[x][y])
      return 0;
  return 1;
}
main()
{
   int i,j,k=0;
   for(i=0;i<5;i++)
     for(j=0;j<5;j++)
       scanf("%d",&a[i][j]);
   for(i=0;i<5;i++)
     for(j=0;j<5;j++) 
       if(judge(i,j)) 
         {
           printf("%d %d %d",i+1,j+1,a[i][j]);
           k=1;
         }
   if (k==0)
     printf("not found");        
}
int main ()
{
	int a[5][5], i, j, t, k, l, m, n, flag, count = 0;
	for (i = 0; i < 5; i++)
	{
		for (j = 0; j < 5; j++)
			cin >> a[i][j];
	}
	for (k = 0; k < 5; k++)
	{
		t = a[k][0];
		flag = 1;
		for (n = 0; n < 5; n++)
		{
			if (t <= a[k][n])
			{
				t = a[k][n];
				m = n;
			}
		}
		for (l = 0; l < 5; l++)
		{
			if (a[k][m] > a[l][m])
			{
				flag = 0;
				continue;
			}
		}
		if (flag == 1)
		{
			cout << k + 1 <<' '<< m + 1 <<' '<< a[k][m] << endl;
			count = 1;
		}
	}
	if (count == 0)
		cout << "not found" << endl;
	return 0;
}
int main()
{
	int x[5][5],i,j,m,r,c;
	for(i=0;i<5;i++)
		for(j=0;j<5;j++)
			cin>>x[i][j];
	for(i=0;i<5;i++)
	{
		m=1<<31;
		for(j=0;j<5;j++)
		{
			if(x[i][j]>m)
			{
				m=x[i][j];
				r=i;c=j;
			}
		}
		if(m<=x[0][c] && m<=x[1][c] && m<=x[2][c] && m<=x[3][c] && m<=x[4][c])
		{
			cout<<r+1<<" "<<c+1<<" "<<m<<endl;
			return 0;
		}
	}
	cout<<"not found\n";
	return 0;
}
main()
{
      int i,j,k,a[6][6],m;
      char c;
      m=0;
      for(i=1;i<=5;i++)
      {
           for(j=1;j<=5;j++)
              scanf("%d%c",&a[i][j],&c);
      }
      for(i=1;i<=5;i++)
      {
           for(j=1;j<=5;j++)  
           {
                for(k=1;k<=5;k++)
                {
                   if(k==j) continue;
                   if(a[i][j]<a[i][k]) break;
                }
                if(k!=6) continue;
                
                for(k=1;k<=5;k++)
                {
                   if(k==i) continue;
                   if(a[i][j]>a[k][j]) break;
                }
                if(k==6)
                {printf("%d %d %d",i,j,a[i][j]);m++;break;}
           }
      }
      if(m==0) printf("not found");
}
int main()
{
 int i, j, k, h, a[5][5], c, d, e = 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;j <= 4;j++)
  {c = 0;
   d = 0;
   for(k = 0;k <= 4;k++)
   {if(a[i][j] < a[i][k])
    {c = c + 1;} 
   }
   for(h = 0;h <= 4;h++)
   {if(a[i][j] > a[h][j])
    {d = d + 1;}
    }
   if(c == 0&&d == 0)
   {cout << i + 1 << " " << j + 1<< " " << a[i][j] << endl;
    e = e + 1;}
   }
  }
  if(e == 0)
  {cout << "not found" << endl;}
 return 0;
}
//******************************************
//?????????
//??????
//?????2010.11.05
//????????????
//******************************************
int main ()
{	
	//??5?5???????????????????????
	int a[5][5], min, k, m, g=0, num;
	for (int i = 0; i < 5; i++)
	{
		for (int j =0; j < 5;j++)
		{
			cin >> k;
			a[i][j]=k;
		}
	}								//for??????????
	for (int n = 0; n < 5; n++)
	{
		int max = 0;
		for (int j = 0; j < 5; j++)
		{
			if (a[n][j] > max)
			{
				max = a[n][j];
				num =j;
			}
		}							//????????
		min = max;
		for (m = 0; m < 5;m++)
		{	
			if (a[m][num] < min) 
				break;
		}							//???????????
		if (m == 5)					
		{
			cout << n+1 << " " << num+1 << " " << min << endl;
			g++;
		}							//????????????????????
	}
	if (g == 0)
		cout << "not found" << endl;//??????
	return 0;
}
int max(int,int,int,int,int);
int min(int,int,int,int,int);
int main()
{int a[5][5],i,j,k=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;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]))
     { cout<<i+1<<" "<<j+1<<" "<<a[i][j];
                                k=k+1; }
   }
  if(k==0)cout<<"not found";
  return 0;
}
  
  
 int max(int g,int f,int c,int d,int e)
{ int sum=0,i,j;
  int b[5];
  b[0]=g;b[1]=f;b[2]=c;b[3]=d;b[4]=e;
  for(i=0;i<=4;i++)
  {sum=0;
  for(j=0;j<=4;j++)
  {if(b[j]>b[i])break;
  if(b[j]<=b[i])sum++;
  if(sum==5)return b[i];}}
}
  
 int min(int g,int f,int c,int d,int e)
{ int sum=0,i,j;
  int b[5];
  b[0]=g;b[1]=f;b[2]=c;b[3]=d;b[4]=e;
  for(i=0;i<=4;i++)
  {sum=0;
  for(j=0;j<=4;j++)
  {if(b[j]<b[i])break;
  if(b[j]>=b[i])sum++;
  if(sum==5)return b[i];}}
}
/*??????
 *?????w5.cpp
 *Created on: 2012-11-10
 *???????
 */
int main(){
	int m,i,j,k=0;
	int a[5][5];
	for (i=0;i<5;i++)
		for (j=0;j<5;j++)
		{cin >> m;a[i][j]=m;}
	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[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] << endl;break;}//????
			else k++;
			}
	if (k==25)
		{cout << "not found" << endl;}
	return 0;//????


}
int main()
{
	int A[5], B[5], a[5][5], i, j, k, m, n = 0;
	for (i = 0; i <= 4; i ++)
		for (j = 0; j <= 4; j ++)
			cin >> a[i][j];

	for (i = 0; i <= 4; i ++)
	{
		A[i] = a[i][0];
		for (j = 0; j <= 4; j ++)
			if (a[i][j] >= A[i])
			{
				A[i] = a[i][j];
				m = j;
			}

		B[m] = a[0][m];
		for (k = 0; k<= 4; k ++)
			if (a[k][m] <= B[m])
				B[m] = a[k][m];
		if (A[i] == B[m])
			{
				n ++;
				cout << i + 1 << " " << m + 1 << " " << a[i][m] << endl;
			}
	}
	if (n == 0)
		cout << "not found" << endl;
	return 0;
}
int main()
{
	int a[5][5],i,j,k,l,max=0,max1=0,max2=0,min1=0,min2=0,min=0,t=0,r,s;
	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(j==0)
			{
				max=a[i][0];
				r=0;
			}
			else if(a[i][j]>max)
			{
				max=a[i][j];
				r=j;
			}
		}
		for(k=0;k<5;k++)
		{
		    for(l=0;l<5;l++)
			{
				if(l==0)
				{
					min=a[0][k];
					s=0;
				}
				else if(a[l][k]<min)
				{
					min=a[l][k];
					s=l;
				}
			}
							
			if(max==min&&i==s&&r==k)
			{
                s++;
                r++;
				printf("%d %d %d",s,r,min);
				t++;
				max=0;min=100;
			}
		}
				
			
	}
	if(t==0)
	{
		printf("not found");
	}
	return 0;
}
int main()
{ 
int a[5][5];
int i,j,p;

int x1,x2;
int c=0,m=0,tmp=0;



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

for(i=0;i<5;i++)
{ 
tmp = 0; 
for(j=0;j<5;j++)
{
if(a[i][j]>tmp)
{ 
tmp=a[i][j];
x1=i;
x2=j;
}
}

m=0; 
for(p=(x1-1);p>=0;p--)
{  
if(a[p][x2]<a[x1][x2])
{ 
m++;
break;
}
}
for(p=(x1+1);p<5;p++)
{   
if(a[p][x2]<a[x1][x2])
{
m++;
break;
}
}
if(m==0)
{  
printf("%d %d %d\n",x1+1,x2+1,a[x1][x2]); 
c++;
}
}

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

return 0;
}
int main(){
int i,j,k,t,max,min,c,num,d;
int a[5][5];
for (i=0;i<5;i++){
	for (j=0;j<5;j++){
	scanf("%d",&a[i][j]);
	}
  }
d=5;
for (k=0;k<5;k++){
	max=a[k][0];
	c=0;
  for (t=1;t<5;t++){
		if (a[k][t]>max){
			max=a[k][t];
			c=t;
		}
	}
	num=0;
  for (int m=0;m<5;m++){
		if(max>a[m][c]){
			d--;
			break;
			}
		else{
			num++;
		}
		if (num==5){
		printf("%d %d %d",k+1,c+1,a[k][c]);
		}
	}
 }	
 if(d==0){
	printf("not found");
		}
 return 0;
}
main()
{
    int a[5][5],i,j,k,t1,t2,sum;
    for(i=0;i<5;i++)
    {
        for(j=0;j<5;j++)
        {
            scanf("%d",&a[i][j]);
        }
    }
    sum=0;
    for(i=0;i<5;i++)
    {
        for(j=0;j<5;j++)
        {
            t1=0;
            t2=0;
            for(k=0;k<5;k++)
            {
                if(a[i][k]>a[i][j])
                t1++;
                if(a[k][j]<a[i][j])
                t2++;
            }
            if(t1==0&&t2==0)
            {
                printf("%d %d %d",i+1,j+1,a[i][j]);
                sum++;
            }
        }
    }
    if(sum==0)
    printf("not found");
}
int main(){
	int a[5][5];
	int i,j,x[5],y[5],b,c,k=0;
	for(i=0;i<5;i++){
		for(j=0;j<5;j++){
			scanf("%d",&a[i][j]);
		}
	}
	for(i=0;i<5;i++){
		b=a[i][0];
		x[i]=0;
		for(j=1;j<5;j++){
			if(a[i][j]>b){
				x[i]=j;
				b=a[i][j];
			}
		}
	}
	for(j=0;j<5;j++){
		c=a[0][j];
		y[j]=0;
		for(i=1;i<5;i++){
			if(a[i][j]<c){
				y[j]=i;
				c=a[i][j];
			}
		}
	}
	for(i=0;i<5;i++){
		for(j=0;j<5;j++){
			if(x[i]==j&&y[j]==i){
				printf("%d %d %d",i+1,j+1,a[i][j]);
				k++;
			}
		}
	}
	if(k==0){printf("not found");}
	return 0;
}
/*#########????.cpp#########*
*############??###############*
*#########1000062710############*
*********************************/
int main()
{
	int a[6][6] = {0},k = 0,m = 0,count = 0;
	for(int i = 1; i <= 5; i ++)
	{
		for(int j = 1; j <= 5; j ++)
		{
			cin >> a[i][j];
		}
	}
	for(k = 1; k <= 5; k ++)
	{
		for(m = 1; m <= 5; m ++)
		{
			if((a[m][k] > a[1][k])||(a[m][k] > a[2][k])||(a[m][k] > a[3][k])||(a[m][k] > a[4][k])||(a[m][k] > a[5][k])||(a[m][k] 
			   < a[m][1])||(a[m][k] < a[m][2])||(a[m][k] < a[m][3])||(a[m][k] < a[m][4])||(a[m][k] < a[m][5]))
			   {
				   
				   if((m == 5)&&(k == 5)&&(count == 0)) cout << "not found" << endl;
			   }
			   
			else 
				{
					cout << m << " " << k << " " << a[m][k] << endl;
					count = 1;
					break;
			    }
			
		}
		
	}

	
	return 0;
}
int main()
{
	int a[5][5], sign[5][5] = {0}, max, flag = 0;
	for (int i = 0; i < 5; i++)
	{
		max = 0;
		for (int j = 0; j < 5; j++)
		{
			cin >> a[i][j];
            if (a[i][j] > max)
			{
				max = a[i][j];
			}
		}
		for (int k = 0; k < 5; k++)
		{
			if (a[i][k] == max)
				sign[i][k] = 1;
		}
	}
	for (int m = 0; m < 5; m++)
	{
		for (int n = 0; n < 5; n++)
		{
			if (sign[m][n] == 1)
			{
				for (int p = 0; p < 5; p++)
				{
					if (a[p][n] < a[m][n])break;
					if (p == 4)
					{
						cout << m + 1 << ' ' << n + 1 << ' ' << a[m][n];
						flag = 1;
					}
				}
			}
		}
	}
	if (flag == 0)
		cout << "not found" << endl;
	
	return 0;
}
int main()
{
	int a[7][7];                                             //????
	int cnt = 0;                                                 //??????????????
	
	for ( int k = 0; k < 5; k++ )                            //??
	{
		for ( int l = 0; l < 5; l++ )
			cin >> a[k][l];
	}

	for ( int i = 0; i < 5; i++ )
	{
		for ( int 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] )
			{
				cout << i + 1 << " " << j + 1 << " " << a[i][j] << endl;
				cnt++;                                       //??????????
			}
		}
	}

	if ( cnt == 0 )                                          //??????0?????????not found
		cout << "not found";
	return 0;
}
int main()
{
	int a[5][5],i,j,k,x[5]={0},y[5]={0},g=1;
	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++)
	{
		k=*(*(a+i));
		for(j=0;j<5;j++)
		{
			if(*(*(a+i)+j)>k)
			{
				k=*(*(a+i)+j);
				*(x+i)=j;
			}
		}
	}
	for(i=0;i<5;i++)
	{
		k=*(*a+i);
		for(j=0;j<5;j++)
		{
			if(*(*(a+j)+i)<k)
			{
				k=*(*(a+j)+i);
				*(y+i)=j;
			}
		}
	}
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		{
			if(i==*(y+j)&&j==*(x+i))
			{
				g=0;
				printf("%d %d %d\n",i+1,j+1,*(*(a+i)+j));
			}
		}
	}
	if(g==1)
		printf("not found");
}
int main()
{
    int a[5][5],i,j,max,b,c,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=0;
                    for(j=0;j<5;j++)
                    {
                                    if(max<a[i][j])
                                    {
                                                   max=a[i][j];
                                                   b=i;
                                                   c=j;
                                    }
                    }
                    if(max<=a[0][c]&&max<=a[1][c]&&max<=a[2][c]&&max<=a[3][c]&&max<=a[4][c])
                    {
                    m=1;
                    break;
                    }

    }
    if(m)
    printf("%d %d %d",b+1,c+1,a[b][c]);
    else
    printf("not found");
    return 0;
}
int main()
{
    int a[5][5];
    int b[5]={0};
    int c[5];
    int i,j,m,k;
    m=-1;
    for(i=0;i<=4;i++)
    {
        for(j=0;j<=4;j++)             
        {
             scanf("%d",&a[i][j])  ;                       
            c[j]=a[i][j]; 
            b[i]=a[i][j];                                         
        }             
    }
   for(i=0;i<=4;i++)
    {
        for(j=0;j<=4;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<=4;i++)
    {
        for(j=0;j<=4;j++)             
        {
            if(a[i][j]==b[i]&&a[i][j]==c[j]) 
             {
               m=i;
               k=j;
             }                                           
        }             
    }
    if(m==-1) printf("not found");
    else printf("%d %d %d",m+1,k+1,a[m][k]);
    return 0;
}
int main(void)
{
	int map[5][5],max[5],t,i,j,t_max;
	char b=1;
	for(i=0;i<5;i++)
	{
		t_max=0;
		for(j=0;j<5;j++)
		{
			scanf("%d ",&t);
			map[i][j]=t;
			if(t_max<t)
			{
				max[i]=j;
				t_max=t;
			}
		}
	}
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		{
			if(map[j][max[i]]<map[i][max[i]])
				break;
		}
		if(j==5)
		{
			printf("%d %d %d\n",i+1,max[i]+1,map[i][max[i]]);
			b=0;
		}
	}
	if(b)
		printf("not found\n");
	return 0;
}
int main()
{
int sz[5][5],i,j,m,n,h,k,s;
s=0;
for(i=0;i<5;i++){
	for(j=0;j<5;j++){
		scanf("%d",&sz[i][j]);
	}
}
for(i=0;i<5;i++){
    	if(sz[i][0]<sz[i][1]){
			m=sz[i][1];
			n=1;
		}else{
			m=sz[i][0];
			n=0;
		}
	for(j=2;j<5;j++){
	
		if(sz[i][j]>m){			
			m=sz[i][j];
			n=j;
		}
		k=0;
		if(j==4){
			for(h=0;h<5;h++){
		    	 if(sz[h][n]>=sz[i][n]){
                    k++;
				 }else{
			       	break;
				 }
			}
    	 	if(k==5){
	    		printf("%d %d %d",i+1,n+1,sz[i][n]);
		    	s=1;
			}
		}
	}
}
	if(s==0){
			printf("not found");
		}
	return 0;
}
int main()
{
	int a[5][5];
	int row,col,an,i;
	for(row=0;row<5;row++)
	{
		for(col=0;col<5;col++)
		{
			scanf("%d",&a[row][col]);
		}
	}
	int max,min,flag=1,k=1;
	for(row=0;row<5;row++)
	{
		for(col=0;col<5;col++)
		{
			flag=1;
			max=a[row][col];
			min=max;
			for(i=0;i<5;i++)
			{
				if(a[row][i]>max)
				{
					flag=0;
					break;
				}
				if(a[i][col]<min)
				{
					flag=0;
					break;
				}
			}
			if(flag)  
			{
				printf("%d %d %d",row+1,col+1,a[row][col]);
				k=0;
			}
		}
	}
	if(k) printf("not found");
	return 0;
}
int main()
{
	int a[5][5], i, j, max, min, l, k, flag = 0;     //????a[][], ???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 = INT_MIN;
		 min = INT_MAX;                              //??max?min?????
		for (j = 0; j <= 4; j++)
		{
			if(a[i][j] > max)
			{
				max = a[i][j];                       //?????????
				l = j;                               //?????????????????l
			}
		}
		for(k = 0; k <= 4; k++)
		{
			if(a[k][l] < min)              
				min = a[k][l];                       //????????????????????
		}
		if(a[i][l] == min)                           //?????????????????????????????????????
		{
			cout << i + 1 << " " << l + 1 << " " << a[i][l] << '\n';          //?????????????????
			flag = 1;
		}
	}
	if (flag == 0)                                   //????????
		cout << "not found" << '\n';                 //??not found
	return 0;
}
int main()
{
	int a[6][6];
	int i,j;
	for (i=1;i<6;i++)
	{
		for (j=1;j<6;j++)
		{
			scanf ("%d",&a[i][j]);
		}
	}
	int max,min;
	for (i=1;i<6;i++)
	{
		a[i][0]=1;
		max=a[i][1];
		for (j=1;j<6;j++)
		{
			if (a[i][j]>max)
			{
				max=a[i][j];
				a[i][0]=j;
			}
		}
	}
	for (i=1;i<6;i++)
	{
		a[0][i]=1;
		min=a[1][i];
		for (j=1;j<6;j++)
		{
			if (a[j][i]<min)
			{
				min=a[j][i];
				a[0][i]=j;
			}
		}
	}
	int t=0;
	for (i=1;i<6;i++)
	{
			if (a[0][a[i][0]]==i)
			{
				t++;
				printf ("%d %d %d\n",i,a[i][0],a[i][a[i][0]]);
			}
	}
	if (t==0)
		printf ("not found\n");

}
int main()
{
    int n,i,j,k=0;
    int a[5][3]={0};
    int s[5][5]={0};
    int r[5]={0};
    int c[5]={0};
    for(i=0;i<5;i++)
    {
    for(j=0;j<5;j++)
    {scanf("%d",&s[i][j]);
    if(s[i][j]>r[i]) r[i]=s[i][j];
    if(s[i][j]<c[j]||c[j]==0) c[j]=s[i][j];
    }
    }
    for(i=0;i<5;i++)
    {
    for(j=0;j<5;j++)
    if(s[i][j]==r[i]&&s[i][j]==c[j])
    {
        a[k][0]=i+1;
        a[k][1]=j+1;
        a[k][2]=s[i][j];
    }
    }
	k=0;
    //for(k=0;a[k][0]!=0;k++)
	if(a[k][0]==0) printf("not found");
	else
    printf("%d %d %d",a[k][0],a[k][1],a[k][2]);
	return 0;
}
int main()
{
int i,j,k,a[N][M],max,maxj,flag;
for(i=0;i<N;i++)
for(j=0;j<M;j++)
scanf("%d",&a[i][j]); 
for(i=0;i<N;i++)
{ max=a[i][0]; 
maxj=0; 
for(j=0;j<M;j++)
if(a[i][j]>max)
{ max=a[i][j];
maxj=j;
}

flag=1;

for(k=0;k<N;k++)
if(max>a[k][maxj])
{ flag=0;
continue;}

if (flag)
{ printf("%d %d %d\n",i+1,maxj+1,max);
break;
}
}
if(!flag)
printf("not found\n");
}
void bubble(int x[],int n)          //???? ?n?????
{
    int i,j,y;
    for(i=1;i<n;i++)
    {
        for(j=0;j<n-i;j++)
        {
            if(x[j]>x[j+1])
            {
                y=x[j];
                x[j]=x[j+1];
                x[j+1]=y;                  
            }                  
        }                
    }     
} 

int main()
{
   int x[5][5],a[5],b[5];
   int i,j,t1,t2,sign=0;
   
   for(i=0;i<5;i++)
   {
       for(j=0;j<5;j++)
       {
           scanf("%d",&x[i][j]);                
       }                
   }  
   
   for(i=0;i<5;i++)
   {
       for(j=0;j<5;j++)
       {
           a[j]=x[i][j];                
       }
       bubble(a,5);
       for(j=0;j<5;j++)
       {
           if(a[4]==x[i][j])
               t1=j;                
       }
       
       for(j=0;j<5;j++)
       {
           b[j]=x[j][t1];               
       }
       bubble(b,5);
       for(j=0;j<5;j++)
        {
           if(b[0]==x[j][t1])
               t2=j;                
       }
       if(a[4]==b[0])
          {
                     printf("%d %d %d",t2+1,t1+1,a[4]);
                      sign=1;
                      }                        
   } 
   
   if(sign==0)
   printf("not found");
   
    
   scanf("%d",&x[i][j]);  
   return 0;
   
}
/***************************************
*file 4.cpp               **************
*author ???              ************
*date 2013-11-1                 ********
*description  ????           *******
****************************************/

int main()
{
	int a[5][5];
	int i, j, k, l;        //?????????

	//????
	for(i = 0; i < 5; i++)
	{
		for(j = 0; j < 5; j++)
			cin >> a[i][j];
	}
	int b[5], c[5];   //?????????????????????????
	int m;

	//????????????
	for(i = 0; i < 5; i++)
	{
		m = a[i][0], b[i] = 0;
		for(j = 1; j < 5; j++)
		{
			if(a[i][j] > m)
			{
				m = a[i][j];
				b[i] = j;
			}
		}
	}

	//????????????
	for(j = 0; j < 5; j++)
	{
		m = a[0][j]; c[j] = 0;
		for(i = 1; i < 5; i++)
		{
			if(a[i][j] < m)
			{
				m = a[i][j];
				c[j] = i;
			}
		}
	}

	for(i = 0; i < 5; i++)
	{
		if(c[b[i]] == i)     //???i???????????????????i(??i,b[i]????)
		{
			cout << i+1 << " " << b[i] + 1 << " " 
				 << a[i][b[i]] << endl;
			break;
		}
	}
	if(i == 5) cout << "not found" << endl;   //??????????????
	return 0;
}
int main()
{
	int a[5][5];
	int i,j,max[5][3],min[5][3],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++)
		for(j=0;j<5;j++)
		{
			if(a[i][j]>max[i][0])
			{
				max[i][0]=a[i][j];
				max[i][1]=i;
				max[i][2]=j;
			}
		}
	for(i=0;i<5;i++)
		for(j=0;j<5;j++)
		{
			if(j==0)
			{
				min[i][0]=a[j][i];
			    min[i][1]=j;
				min[i][2]=i;
			}
			if(a[j][i]<min[i][0])
			{
				min[i][0]=a[j][i];
			    min[i][1]=j;
				min[i][2]=i;
			}
		}
	for(i=0;i<5;i++)
		for(j=0;j<5;j++)
		{
			if(max[i][1]==min[j][1]&&max[i][2]==min[j][2])
			{
			    m++;
				printf("%d %d %d",max[i][1]+1,max[i][2]+1,max[i][0]);
			}
		}
	if(m==0)
		printf("not found");
	return 0;
}
int main()
{
	//********************************?????????0?n-1
	int a[6][6],b[6][6],c[6][6];//???????????,?????????
	int i=1,j=1,temp1=0,temp2=0;
	for (i=1;i<=5;i++)
	{
		for (j=1;j<=5;j++)
		{
			cin>>a[i][j];
			c[i][j]=b[i][j]=a[i][j];
		}
	}
	
	//**********************i?????5
	for (i=1;i<=5;i++)//????????????????????????
	{
		//****************************????for????????
		for(int k=1;k<=4;k++)
		{
			for (j=1;j<=5-k;j++)
			{
				if (a[i][j]>a[i][j+1])
				{
					temp1=a[i][j];
					a[i][j]=a[i][j+1];
					a[i][j+1]=temp1;
				}
			}
		}
	}//???,???a[i][j]?,?????????????a[i][5]????
	
	//**********************j?????5
	for (j=1;j<=5;j++)//???????????????????????
	{
		//****************************??
		for(int k=1;k<=4;k++)
		{
			for (i=1;i<=5-k;i++)
			{
				if (b[i][j]>b[i+1][j])
				{
					temp2=b[i][j];
					b[i][j]=b[i+1][j];
					b[i+1][j]=temp2;
				}
			}
		}
	}//???,???b[i][j]?,?????????????b[5][j]????
	
	
	int flag=0;
	for (i=1;i<=5;i++)//?c[i][j]??????????
	{
		for (j=1;j<=5;j++)
		{
			if (c[i][j]==a[i][5]&&c[i][j]==b[1][j])//?????c[i][j]			
			{
				cout<<i<<" "<<j<<" "<<c[i][j]<<endl;
				flag++;
			}
		}
	}
	
	if (flag==0)
		cout<<"not found"<<endl;
	return 0;
}
main()
{
      int a[5][5];
      int i,j,k;
      for(i=0;i<5;i++)
      for(j=0;j<5;j++)
      scanf("%d",&a[i][j]);
      int max,maxj,flag;
      for(i=0;i<5;i++)
      {
                      max=a[i][0];
                      maxj=0;
                      for(j=0;j<5;j++)
                      {
                                      if(a[i][j]>max)
                                      {
                                                     max=a[i][j];
                                                     maxj=j;
                                      }
                      }
                      flag=1;
                      for(k=0;k<5;k++)
                      if(max>a[k][maxj])
                      {
                                        flag=0;
                                        continue;
                      }
                      if(flag)
                      {
                              printf("%d %d %d",i+1,maxj+1,max);
                              break;
                      }
      }
      if(flag==0)
      printf("not found\n");
      getchar();
      getchar();
      }
int main()
{
	int i,j,k,max,t,flag=1;
	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++)
	{
		max=0;
		for(j=0;j<5;j++)
		{
			if(a[i][j]>max)
			{
				max=a[i][j];
				t=j;
			}
		}
		for(k=0;k<5;k++)
		{
			if(a[k][t]<max)
			{
				break;
			}
		}
		if(k==5)
		{
			printf("%d %d %d",i+1,t+1,a[i][t]);
			flag=-1;
		}
	}
	if(flag==1)
	{
		printf("not found");
	}
	return 0;
}
//****************************
//*???:4.cpp               *
//*??:??                  *
//*????:2013?11?10?     *
//*????:????           *
//****************************
int main()
{
	//??????,5*5??a[][],????i,j,p,????????max,?????maxc,
	//???????????record
	int a[5][5], i, j, max, maxc, p, record;
	for ( i = 0; i < 5; i ++ )  //?????????????
		for ( j = 0; j < 5; j ++ )
			cin >> a[i][j];
	for ( i = 0; i < 5; i ++ )  //????????????????
	{
		max = 0; record = 0;
		for ( j = 0; j < 5; j ++ )  //???????????????
		{
			if ( a[i][j] > max )  //???????????????
			{
				max = a[i][j];
				maxc = j;  //????????????
			}
		}
		for ( p = 0; p < 5; p ++ )  //??????????max??????????
		{
			if ( p == i )  //??max????
				continue;
			if ( a[p][maxc] < a[i][maxc] )  //??maxc????????????????
			{
				record = 1;  //?????
				break;  //????
			}
		}
		if ( record == 0 )  //??record?????????????????
		{
			cout << i + 1 << " " << maxc + 1 << " " << max;
			break;
		}
	}
	if ( record == 1 )  //???????????record???1?????????????
		cout << "not found";
	return 0;
}