水题
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; const int maxn=100+10; int a[maxn][maxn]; int n,m; int main() { scanf("%d%d",&n,&m); for(int i=1;i<=n;i++) for(int j=1;j<=m;j++) scanf("%d",&a[i][j]); int ans=-1; for(int i=1;i<=n;i++) { int nowMin=0x7fffffff; for(int j=1;j<=m;j++) nowMin=min(nowMin,a[i][j]); ans=max(ans,nowMin); } printf("%d\n",ans); return 0; }
时间: 2024-10-13 08:23:10