Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
89814 | 杨偌昕 | 二维数组的最大值与最小值 | C++ | Accepted | 1 MS | 268 KB | 304 | 2024-09-07 10:35:47 |
#include<bits/stdc++.h> using namespace std; int main() { int n,mxx = 0,ndd=10001 ; cin>>n; int a[n][n]; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ cin>>a[i][j]; if(mxx<a[i][j]){ mxx=a[i][j]; } if(ndd>a[i][j]){ ndd=a[i][j]; } } } cout<<ndd<<" "<<mxx; }