![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/24bc3a3f4a0c21d8be5e82a66833f9db.png)
4
1 7 4 1
4 8 3 6
1 6 1 2
0 7 8 9
2
1 7
4 1
#include <stdio.h>
#define MAXN 6
int main(void)
{
int n, i, j, k, row, col, flag;
int a[MAXN][MAXN];
scanf("%d", &n);
for (i = 0; i < n; i++)
for (j = 0; j < n; j++)
scanf("%d", &a[i][j]);
for (i = 0; i < n; i++)
{
col = 0, flag = 1;
for (j = 0; j < n; j++)
{
if (a[i][col] <= a[i][j])
col = j;
}
for (k = 0; k < n; k++)
{
if (a[i][col] > a[k][col])
{
flag = 0;
break;
}
}
if (flag)
{
row = i;
break;
}
}
if (flag)
printf("%d %d", row, col);
else
printf("NONE");
return 0;
}