鞍点??????哪错了???
#include<stdio.h>#define N 4
main()
{
int a[N-1][N],i,j,max,min,minn[N],maxm[N-1],temp;
for (i=0;i<=N-2;i++)
{
max=a[i][0];
for (j=1;j<=N-1;j++)
{
if (max<a[i][j])
{temp=max;max=a[i][j];a[i][j]=temp;
maxm[i]=j;}
if (maxm>a[i][j])
{ maxm[i]=0;}
}
}
for (j=0;j<=N-1;j++)
{
min=a[0][j];
for (i=1;i<=N-2;i++)
{if (min>a[i][j]))
{temp=min;min=a[i][j];a[i][j]=temp;
minn[j]=i;}
if (min>a[i][j])
{minn[i]=0;}
}
}
for (i=0;i<=N-2;i++)
for (j=0;j<=N-1;j++)
{if (a[i][maxm[j]]==a[j][minn[i]])
{printf("yes\n");
printf("%d",a[i][maxm[j]]);}
}
}
我的意思是求每行最大的数并且是每列最小的数, 这样哪错了